]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/dialog/configure
Import device-tree files from Linux 5.11
[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.20210105.
4 #
5 # Copyright 2003-2020,2021      Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset="unset"
64 else
65   as_unset="false"
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS=
101 MAKEFLAGS=
102 SHELL=${CONFIG_SHELL-/bin/sh}
103
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete.  It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
108
109 ac_unique_file="dialog.h"
110 # Factoring default headers for most tests.
111 ac_includes_default="\
112 #include <stdio.h>
113 #if HAVE_SYS_TYPES_H
114 # include <sys/types.h>
115 #endif
116 #if HAVE_SYS_STAT_H
117 # include <sys/stat.h>
118 #endif
119 #if STDC_HEADERS
120 # include <stdlib.h>
121 # include <stddef.h>
122 #else
123 # if HAVE_STDLIB_H
124 #  include <stdlib.h>
125 # endif
126 #endif
127 #if HAVE_STRING_H
128 # if !STDC_HEADERS && HAVE_MEMORY_H
129 #  include <memory.h>
130 # endif
131 # include <string.h>
132 #endif
133 #if HAVE_STRINGS_H
134 # include <strings.h>
135 #endif
136 #if HAVE_INTTYPES_H
137 # include <inttypes.h>
138 #else
139 # if HAVE_STDINT_H
140 #  include <stdint.h>
141 # endif
142 #endif
143 #if HAVE_UNISTD_H
144 # include <unistd.h>
145 #endif"
146
147 # Initialize some variables set by options.
148 ac_init_help=
149 ac_init_version=false
150 # The variables have the same names as the options, with
151 # dashes changed to underlines.
152 cache_file=/dev/null
153 exec_prefix=NONE
154 no_create=
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 verbose=
164 x_includes=NONE
165 x_libraries=NONE
166
167 # Installation directory options.
168 # These are left unexpanded so users can "make install exec_prefix=/foo"
169 # and all the variables that are supposed to be based on exec_prefix
170 # by default will actually change.
171 # Use braces instead of parens because sh, perl, etc. also accept them.
172 bindir='${exec_prefix}/bin'
173 sbindir='${exec_prefix}/sbin'
174 libexecdir='${exec_prefix}/libexec'
175 datarootdir='${prefix}/share'
176 datadir='${datarootdir}'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 runstatedir='${localstatedir}/run'
181 libdir='${exec_prefix}/lib'
182 includedir='${prefix}/include'
183 oldincludedir='/usr/include'
184 infodir='${datarootdir}/info'
185 mandir='${datarootdir}/man'
186
187 # Identity of this package.
188 PACKAGE_NAME=
189 PACKAGE_TARNAME=
190 PACKAGE_VERSION=
191 PACKAGE_STRING=
192 PACKAGE_BUGREPORT=
193
194 ac_prev=
195 for ac_option
196 do
197   # If the previous option needs an argument, assign it.
198   if test -n "$ac_prev"; then
199     eval "$ac_prev=\$ac_option"
200     ac_prev=
201     continue
202   fi
203
204   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206   # Accept the important Cygnus configure options, so we can diagnose typos.
207
208   case "$ac_option" in
209
210   -bindir | --bindir | --bindi | --bind | --bin | --bi)
211     ac_prev=bindir ;;
212   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213     bindir=$ac_optarg ;;
214
215   -build | --build | --buil | --bui | --bu)
216     ac_prev=build_alias ;;
217   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218     build_alias=$ac_optarg ;;
219
220   -cache-file | --cache-file | --cache-fil | --cache-fi \
221   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222     ac_prev=cache_file ;;
223   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225     cache_file=$ac_optarg ;;
226
227   --config-cache | -C)
228     cache_file=config.cache ;;
229
230   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231     ac_prev=datadir ;;
232   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233   | --da=*)
234     datadir=$ac_optarg ;;
235
236   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237   | --dataroo | --dataro | --datar)
238     ac_prev=datarootdir ;;
239   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241     datarootdir=$ac_optarg ;;
242
243   -disable-* | --disable-*)
244     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245     # Reject names that are not valid shell variable names.
246     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248    { (exit 1); exit 1; }; }
249     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250     eval "enable_$ac_feature=no" ;;
251
252   -enable-* | --enable-*)
253     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254     # Reject names that are not valid shell variable names.
255     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257    { (exit 1); exit 1; }; }
258     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259     case "$ac_option" in
260       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261       *) ac_optarg=yes ;;
262     esac
263     eval "enable_$ac_feature='$ac_optarg'" ;;
264
265   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267   | --exec | --exe | --ex)
268     ac_prev=exec_prefix ;;
269   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271   | --exec=* | --exe=* | --ex=*)
272     exec_prefix=$ac_optarg ;;
273
274   -gas | --gas | --ga | --g)
275     # Obsolete; use --with-gas.
276     with_gas=yes ;;
277
278   -help | --help | --hel | --he | -h)
279     ac_init_help=long ;;
280   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281     ac_init_help=recursive ;;
282   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283     ac_init_help=short ;;
284
285   -host | --host | --hos | --ho)
286     ac_prev=host_alias ;;
287   -host=* | --host=* | --hos=* | --ho=*)
288     host_alias=$ac_optarg ;;
289
290   -includedir | --includedir | --includedi | --included | --include \
291   | --includ | --inclu | --incl | --inc)
292     ac_prev=includedir ;;
293   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294   | --includ=* | --inclu=* | --incl=* | --inc=*)
295     includedir=$ac_optarg ;;
296
297   -infodir | --infodir | --infodi | --infod | --info | --inf)
298     ac_prev=infodir ;;
299   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300     infodir=$ac_optarg ;;
301
302   -libdir | --libdir | --libdi | --libd)
303     ac_prev=libdir ;;
304   -libdir=* | --libdir=* | --libdi=* | --libd=*)
305     libdir=$ac_optarg ;;
306
307   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308   | --libexe | --libex | --libe)
309     ac_prev=libexecdir ;;
310   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311   | --libexe=* | --libex=* | --libe=*)
312     libexecdir=$ac_optarg ;;
313
314   -localstatedir | --localstatedir | --localstatedi | --localstated \
315   | --localstate | --localstat | --localsta | --localst \
316   | --locals | --local | --loca | --loc | --lo)
317     ac_prev=localstatedir ;;
318   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321     localstatedir=$ac_optarg ;;
322
323   -runstatedir | --runstatedir | --runstatedi | --runstated \
324   | --runstate | --runstat | --runsta | --runst \
325   | --runs | --run | --ru)
326     ac_prev=runstatedir ;;
327   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329   | --runs=* | --run=* | --ru=*)
330     runstatedir=$ac_optarg ;;
331
332   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333     ac_prev=mandir ;;
334   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335     mandir=$ac_optarg ;;
336
337   -nfp | --nfp | --nf)
338     # Obsolete; use --without-fp.
339     with_fp=no ;;
340
341   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342   | --no-cr | --no-c)
343     no_create=yes ;;
344
345   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347     no_recursion=yes ;;
348
349   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351   | --oldin | --oldi | --old | --ol | --o)
352     ac_prev=oldincludedir ;;
353   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356     oldincludedir=$ac_optarg ;;
357
358   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359     ac_prev=prefix ;;
360   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361     prefix=$ac_optarg ;;
362
363   -program-prefix | --program-prefix | --program-prefi | --program-pref \
364   | --program-pre | --program-pr | --program-p)
365     ac_prev=program_prefix ;;
366   -program-prefix=* | --program-prefix=* | --program-prefi=* \
367   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368     program_prefix=$ac_optarg ;;
369
370   -program-suffix | --program-suffix | --program-suffi | --program-suff \
371   | --program-suf | --program-su | --program-s)
372     ac_prev=program_suffix ;;
373   -program-suffix=* | --program-suffix=* | --program-suffi=* \
374   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375     program_suffix=$ac_optarg ;;
376
377   -program-transform-name | --program-transform-name \
378   | --program-transform-nam | --program-transform-na \
379   | --program-transform-n | --program-transform- \
380   | --program-transform | --program-transfor \
381   | --program-transfo | --program-transf \
382   | --program-trans | --program-tran \
383   | --progr-tra | --program-tr | --program-t)
384     ac_prev=program_transform_name ;;
385   -program-transform-name=* | --program-transform-name=* \
386   | --program-transform-nam=* | --program-transform-na=* \
387   | --program-transform-n=* | --program-transform-=* \
388   | --program-transform=* | --program-transfor=* \
389   | --program-transfo=* | --program-transf=* \
390   | --program-trans=* | --program-tran=* \
391   | --progr-tra=* | --program-tr=* | --program-t=*)
392     program_transform_name=$ac_optarg ;;
393
394   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395   | -silent | --silent | --silen | --sile | --sil)
396     silent=yes ;;
397
398   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399     ac_prev=sbindir ;;
400   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401   | --sbi=* | --sb=*)
402     sbindir=$ac_optarg ;;
403
404   -sharedstatedir | --sharedstatedir | --sharedstatedi \
405   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406   | --sharedst | --shareds | --shared | --share | --shar \
407   | --sha | --sh)
408     ac_prev=sharedstatedir ;;
409   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412   | --sha=* | --sh=*)
413     sharedstatedir=$ac_optarg ;;
414
415   -site | --site | --sit)
416     ac_prev=site ;;
417   -site=* | --site=* | --sit=*)
418     site=$ac_optarg ;;
419
420   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421     ac_prev=srcdir ;;
422   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423     srcdir=$ac_optarg ;;
424
425   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426   | --syscon | --sysco | --sysc | --sys | --sy)
427     ac_prev=sysconfdir ;;
428   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430     sysconfdir=$ac_optarg ;;
431
432   -target | --target | --targe | --targ | --tar | --ta | --t)
433     ac_prev=target_alias ;;
434   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435     target_alias=$ac_optarg ;;
436
437   -v | -verbose | --verbose | --verbos | --verbo | --verb)
438     verbose=yes ;;
439
440   -version | --version | --versio | --versi | --vers | -V)
441     ac_init_version=: ;;
442
443   -with-* | --with-*)
444     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445     # Reject names that are not valid shell variable names.
446     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447       { echo "$as_me: error: invalid package name: $ac_package" >&2
448    { (exit 1); exit 1; }; }
449     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450     case "$ac_option" in
451       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452       *) ac_optarg=yes ;;
453     esac
454     eval "with_$ac_package='$ac_optarg'" ;;
455
456   -without-* | --without-*)
457     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458     # Reject names that are not valid shell variable names.
459     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460       { echo "$as_me: error: invalid package name: $ac_package" >&2
461    { (exit 1); exit 1; }; }
462     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463     eval "with_$ac_package=no" ;;
464
465   --x)
466     # Obsolete; use --with-x.
467     with_x=yes ;;
468
469   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470   | --x-incl | --x-inc | --x-in | --x-i)
471     ac_prev=x_includes ;;
472   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474     x_includes=$ac_optarg ;;
475
476   -x-libraries | --x-libraries | --x-librarie | --x-librari \
477   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478     ac_prev=x_libraries ;;
479   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481     x_libraries=$ac_optarg ;;
482
483   -*) { echo "$as_me: error: unrecognized option: $ac_option
484 Try \`$0 --help' for more information." >&2
485    { (exit 1); exit 1; }; }
486     ;;
487
488   *=*)
489     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490     # Reject names that are not valid shell variable names.
491     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493    { (exit 1); exit 1; }; }
494     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495     eval "$ac_envvar='$ac_optarg'"
496     export "$ac_envvar" ;;
497
498   *)
499     # FIXME: should be removed in autoconf 3.0.
500     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
504     ;;
505
506   esac
507 done
508
509 if test -n "$ac_prev"; then
510   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511   { echo "$as_me: error: missing argument to $ac_option" >&2
512    { (exit 1); exit 1; }; }
513 fi
514
515 # Be sure to have absolute paths.
516 for ac_var in exec_prefix prefix
517 do
518   eval ac_val=$`echo "$ac_var"`
519   case "$ac_val" in
520     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
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 # Be sure to have absolute paths.
527 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528               localstatedir libdir includedir oldincludedir infodir mandir
529 do
530   eval ac_val=$`echo "$ac_var"`
531   case "$ac_val" in
532     [\\/$]* | ?:[\\/]* ) ;;
533     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534    { (exit 1); exit 1; }; };;
535   esac
536 done
537
538 # There might be people who depend on the old broken behavior: `$host'
539 # used to hold the argument of --host etc.
540 build=$build_alias
541 host=$host_alias
542 target=$target_alias
543
544 # FIXME: should be removed in autoconf 3.0.
545 if test "x$host_alias" != x; then
546   if test "x$build_alias" = x; then
547     cross_compiling=maybe
548     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549     If a cross compiler is detected then cross compile mode will be used." >&2
550   elif test "x$build_alias" != "x$host_alias"; then
551     cross_compiling=yes
552   fi
553 fi
554
555 ac_tool_prefix=
556 test -n "$host_alias" && ac_tool_prefix=$host_alias-
557
558 test "$silent" = yes && exec 6>/dev/null
559
560 # Find the source files, if location was not specified.
561 if test -z "$srcdir"; then
562   ac_srcdir_defaulted=yes
563   # Try the directory containing this script, then its parent.
564   ac_prog=$0
565   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567   srcdir=$ac_confdir
568   if test ! -r "$srcdir/$ac_unique_file"; then
569     srcdir=..
570   fi
571 else
572   ac_srcdir_defaulted=no
573 fi
574 if test ! -r "$srcdir/$ac_unique_file"; then
575   if test "$ac_srcdir_defaulted" = yes; then
576     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577    { (exit 1); exit 1; }; }
578   else
579     { echo "$as_me: error: cannot find sources in $srcdir" >&2
580    { (exit 1); exit 1; }; }
581   fi
582 fi
583 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584 ac_env_build_alias_set=${build_alias+set}
585 ac_env_build_alias_value=$build_alias
586 ac_cv_env_build_alias_set=${build_alias+set}
587 ac_cv_env_build_alias_value=$build_alias
588 ac_env_host_alias_set=${host_alias+set}
589 ac_env_host_alias_value=$host_alias
590 ac_cv_env_host_alias_set=${host_alias+set}
591 ac_cv_env_host_alias_value=$host_alias
592 ac_env_target_alias_set=${target_alias+set}
593 ac_env_target_alias_value=$target_alias
594 ac_cv_env_target_alias_set=${target_alias+set}
595 ac_cv_env_target_alias_value=$target_alias
596 ac_env_CC_set=${CC+set}
597 ac_env_CC_value=$CC
598 ac_cv_env_CC_set=${CC+set}
599 ac_cv_env_CC_value=$CC
600 ac_env_CFLAGS_set=${CFLAGS+set}
601 ac_env_CFLAGS_value=$CFLAGS
602 ac_cv_env_CFLAGS_set=${CFLAGS+set}
603 ac_cv_env_CFLAGS_value=$CFLAGS
604 ac_env_LDFLAGS_set=${LDFLAGS+set}
605 ac_env_LDFLAGS_value=$LDFLAGS
606 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607 ac_cv_env_LDFLAGS_value=$LDFLAGS
608 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609 ac_env_CPPFLAGS_value=$CPPFLAGS
610 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612 ac_env_CPP_set=${CPP+set}
613 ac_env_CPP_value=$CPP
614 ac_cv_env_CPP_set=${CPP+set}
615 ac_cv_env_CPP_value=$CPP
616
617 #
618 # Report the --help message.
619 #
620 if test "$ac_init_help" = "long"; then
621   # Omit some internal or obsolete options to make the list less imposing.
622   # This message is too long to be a string in the A/UX 3.1 sh.
623   cat <<EOF
624 \`configure' configures this package to adapt to many kinds of systems.
625
626 Usage: $0 [OPTION]... [VAR=VALUE]...
627
628 To assign environment variables (e.g., CC, CFLAGS...), specify them as
629 VAR=VALUE.  See below for descriptions of some of the useful variables.
630
631 Defaults for the options are specified in brackets.
632
633 Configuration:
634   -h, --help              display this help and exit
635       --help=short        display options specific to this package
636       --help=recursive    display the short help of all the included packages
637   -V, --version           display version information and exit
638   -q, --quiet, --silent   do not print \`checking...' messages
639       --cache-file=FILE   cache test results in FILE [disabled]
640   -C, --config-cache      alias for \`--cache-file=config.cache'
641   -n, --no-create         do not create output files
642       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
643
644 EOF
645
646   cat <<EOF
647 Installation directories:
648   --prefix=PREFIX         install architecture-independent files in PREFIX
649                           [$ac_default_prefix]
650   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
651                           [PREFIX]
652
653 By default, \`make install' will install all the files in
654 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
655 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656 for instance \`--prefix=\$HOME'.
657
658 For better control, use the options below.
659
660 Fine tuning of the installation directories:
661   --bindir=DIR            user executables [EPREFIX/bin]
662   --sbindir=DIR           system admin executables [EPREFIX/sbin]
663   --libexecdir=DIR        program executables [EPREFIX/libexec]
664   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
665   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
666   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
667   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
668   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
669   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 X features:
685   --x-includes=DIR    X include files are in DIR
686   --x-libraries=DIR   X library files are in DIR
687
688 System types:
689   --build=BUILD           configure for building on BUILD [guessed]
690   --host=HOST       build programs to run on HOST [BUILD]
691 EOF
692 fi
693
694 if test -n "$ac_init_help"; then
695
696   cat <<\EOF
697
698 Optional Features:
699   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
700   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
701
702 Optional Packages:
703   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
704   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
705
706   --disable-echo          do not display "compiling" commands
707   --disable-largefile     omit support for large files
708   --with-install-prefix=XXX sets DESTDIR, useful for packaging
709   --with-x                use the X Window System
710   --enable-warnings       test: turn on gcc compiler warnings
711   --with-pkg-config{=path} enable/disable use of pkg-config
712   --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
713   --enable-header-subdir  install dlg_XXX headers to subdirectory
714   --with-man2html=XXX     use XXX rather than groff
715   --with-libiconv-prefix=DIR
716                           search for libiconv in DIR/include and DIR/lib
717   --enable-nls            use Native Language Support
718   --with-included-gettext use the GNU gettext library included here
719   --with-textdomain=PKG   NLS text-domain (default is package name)
720   --disable-included-msgs use included messages, for i18n support
721   --with-dmalloc          test: use Gray Watson's dmalloc library
722   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
723   --with-purify           test: use Purify
724   --with-valgrind         test: use valgrind
725   --with-no-leaks         test: free permanent memory, analyze leaks
726   --disable-trace         do not support --trace option
727   --enable-rpath          use rpath option when generating shared libraries
728   --with-rel-version=XXX  override derived release version
729   --with-abi-version=XXX  override derived ABI version
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-libtool-opts=XXX specify additional libtool options
733   --with-export-syms=XXX  limit exported symbols using libtool
734   --with-shared           generate shared-libraries
735   --with-shlib-version=X  Specify rel or abi version for shared libs
736   --with-versioned-syms=X markup versioned symbols using ld
737   --with-curses-dir=DIR   directory in which (n)curses is installed
738   --with-screen=XXX       use specified curses-libraries
739   --with-ncursesw         use wide ncurses-libraries
740   --with-ncurses          use ncurses-libraries
741   --with-pdcurses         compile/link with pdcurses X11 library
742   --with-curses-colr      compile/link with HPUX 10.x color-curses
743   --with-curses-5lib      compile/link with SunOS 5lib curses
744   --with-Xaw3d            link with Xaw 3d library
745   --with-Xaw3dxft         link with Xaw 3d xft library
746   --with-neXtaw           link with neXT Athena library
747   --with-XawPlus          link with Athena-Plus library
748   --disable-extras        do not include extra dialogs
749   --disable-rc-file       do not include config-file support
750   --disable-rc-file2      do not use extra attributes in config-file
751   --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
752   --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
753   --disable-whiptail      do not map extra whiptail options
754   --disable-form          do not include the form dialog
755   --disable-gauge         do not include the gauge dialogs
756   --disable-tailbox       do not include the tailbox dialog
757   --disable-mixedform     do not include the mixedform dialog
758   --disable-mixedgauge    do not include the mixedgauge dialog
759   --enable-widec          enable wide-curses features
760   --disable-rpath-hack    don't add rpath options for additional libraries
761
762 Some influential environment variables:
763   CC          C compiler command
764   CFLAGS      C compiler flags
765   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
766               nonstandard directory <lib dir>
767   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
768               headers in a nonstandard directory <include dir>
769   CPP         C preprocessor
770
771 Use these variables to override the choices made by `configure' or to help
772 it to find libraries and programs with nonstandard names/locations.
773
774 EOF
775 fi
776
777 if test "$ac_init_help" = "recursive"; then
778   # If there are subdirs, report their specific --help.
779   ac_popdir=`pwd`
780   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
781     cd "$ac_subdir"
782     # A "../" for each directory in /$ac_subdir.
783     ac_dots=`echo "$ac_subdir" |
784              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
785
786     case "$srcdir" in
787     .) # No --srcdir option.  We are building in place.
788       ac_sub_srcdir="$srcdir" ;;
789     [\\/]* | ?:[\\/]* ) # Absolute path.
790       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
791     *) # Relative path.
792       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
793     esac
794
795     # Check for guested configure; otherwise get Cygnus style configure.
796     if test -f "$ac_sub_srcdir/configure.gnu"; then
797       echo
798       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
799     elif test -f "$ac_sub_srcdir/configure"; then
800       echo
801       $SHELL "$ac_sub_srcdir/configure" --help=recursive
802     elif test -f "$ac_sub_srcdir/configure.ac" ||
803            test -f "$ac_sub_srcdir/configure.in"; then
804       echo
805       "$ac_configure" --help
806     else
807       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
808     fi
809     cd "$ac_popdir"
810   done
811 fi
812
813 test -n "$ac_init_help" && exit 0
814 if "$ac_init_version"; then
815   cat <<\EOF
816
817 Copyright 2003-2020,2021        Thomas E. Dickey
818 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
819 Free Software Foundation, Inc.
820 This configure script is free software; the Free Software Foundation
821 gives unlimited permission to copy, distribute and modify it.
822 EOF
823   exit 0
824 fi
825 exec 5>config.log
826 cat >&5 <<EOF
827 This file contains any messages produced by compilers while
828 running configure, to aid debugging if configure makes a mistake.
829
830 It was created by $as_me, which was
831 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
832
833   $ $0 $@
834
835 EOF
836 {
837 cat <<_ASUNAME
838 ## ---------- ##
839 ## Platform.  ##
840 ## ---------- ##
841
842 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
843 uname -m = `(uname -m) 2>/dev/null || echo unknown`
844 uname -r = `(uname -r) 2>/dev/null || echo unknown`
845 uname -s = `(uname -s) 2>/dev/null || echo unknown`
846 uname -v = `(uname -v) 2>/dev/null || echo unknown`
847
848 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
849 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
850
851 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
852 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
853 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
854 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
855 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
856 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
857 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
858
859 PATH = $PATH
860
861 _ASUNAME
862 } >&5
863
864 cat >&5 <<EOF
865 ## ------------ ##
866 ## Core tests.  ##
867 ## ------------ ##
868
869 EOF
870
871 # Keep a trace of the command line.
872 # Strip out --no-create and --no-recursion so they do not pile up.
873 # Also quote any args containing shell meta-characters.
874 ac_configure_args=
875 ac_sep=
876 for ac_arg
877 do
878   case "$ac_arg" in
879   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
880   | --no-cr | --no-c) ;;
881   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
882   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
883   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
884     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
885     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
886     ac_sep=" " ;;
887   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
888      ac_sep=" " ;;
889   esac
890   # Get rid of the leading space.
891 done
892
893 # When interrupted or exit'd, cleanup temporary files, and complete
894 # config.log.  We remove comments because anyway the quotes in there
895 # would cause problems or look ugly.
896 trap 'exit_status=$?
897   # Save into config.log some information that might help in debugging.
898   echo >&5
899   echo "## ----------------- ##" >&5
900   echo "## Cache variables.  ##" >&5
901   echo "## ----------------- ##" >&5
902   echo >&5
903   # The following way of writing the cache mishandles newlines in values,
904 {
905   (set) 2>&1 |
906     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
907     *ac_space=\ *)
908       sed -n \
909         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
910           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
911       ;;
912     *)
913       sed -n \
914         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
915       ;;
916     esac;
917 } >&5
918   sed "/^$/d" confdefs.h >conftest.log
919   if test -s conftest.log; then
920     echo >&5
921     echo "## ------------ ##" >&5
922     echo "## confdefs.h.  ##" >&5
923     echo "## ------------ ##" >&5
924     echo >&5
925     cat conftest.log >&5
926   fi
927   (echo; echo) >&5
928   test "$ac_signal" != 0 &&
929     echo "$as_me: caught signal $ac_signal" >&5
930   echo "$as_me: exit $exit_status" >&5
931   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
932     exit $exit_status
933      ' 0
934 for ac_signal in 1 2 13 15; do
935   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
936 done
937 ac_signal=0
938
939 # confdefs.h avoids OS command line length limits that DEFS can exceed.
940 rm -rf conftest* confdefs.h
941 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
942 echo >confdefs.h
943
944 # Let the site file select an alternate cache file if it wants to.
945 # Prefer explicitly selected file to automatically selected ones.
946 if test -z "$CONFIG_SITE"; then
947   if test "x$prefix" != xNONE; then
948     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
949   else
950     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
951   fi
952 fi
953 for ac_site_file in $CONFIG_SITE; do
954   if test -r "$ac_site_file"; then
955     { echo "$as_me:955: loading site script $ac_site_file" >&5
956 echo "$as_me: loading site script $ac_site_file" >&6;}
957     cat "$ac_site_file" >&5
958     . "$ac_site_file"
959   fi
960 done
961
962 if test -r "$cache_file"; then
963   # Some versions of bash will fail to source /dev/null (special
964   # files actually), so we avoid doing that.
965   if test -f "$cache_file"; then
966     { echo "$as_me:966: loading cache $cache_file" >&5
967 echo "$as_me: loading cache $cache_file" >&6;}
968     case $cache_file in
969       [\\/]* | ?:[\\/]* ) . $cache_file;;
970       *)                      . ./$cache_file;;
971     esac
972   fi
973 else
974   { echo "$as_me:974: creating cache $cache_file" >&5
975 echo "$as_me: creating cache $cache_file" >&6;}
976   >$cache_file
977 fi
978
979 # Check that the precious variables saved in the cache have kept the same
980 # value.
981 ac_cache_corrupted=false
982 for ac_var in `(set) 2>&1 |
983                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
984   eval ac_old_set=\$ac_cv_env_${ac_var}_set
985   eval ac_new_set=\$ac_env_${ac_var}_set
986   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
987   eval ac_new_val="\$ac_env_${ac_var}_value"
988   case "$ac_old_set,$ac_new_set" in
989     set,)
990       { echo "$as_me:990: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
991 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
992       ac_cache_corrupted=: ;;
993     ,set)
994       { echo "$as_me:994: error: \`$ac_var' was not set in the previous run" >&5
995 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
996       ac_cache_corrupted=: ;;
997     ,);;
998     *)
999       if test "x$ac_old_val" != "x$ac_new_val"; then
1000         { echo "$as_me:1000: error: \`$ac_var' has changed since the previous run:" >&5
1001 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1002         { echo "$as_me:1002:   former value:  $ac_old_val" >&5
1003 echo "$as_me:   former value:  $ac_old_val" >&2;}
1004         { echo "$as_me:1004:   current value: $ac_new_val" >&5
1005 echo "$as_me:   current value: $ac_new_val" >&2;}
1006         ac_cache_corrupted=:
1007       fi;;
1008   esac
1009   # Pass precious variables to config.status.  It doesn't matter if
1010   # we pass some twice (in addition to the command line arguments).
1011   if test "$ac_new_set" = set; then
1012     case "$ac_new_val" in
1013     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1014       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1015       ac_configure_args="$ac_configure_args '$ac_arg'"
1016       ;;
1017     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1018        ;;
1019     esac
1020   fi
1021 done
1022 if "$ac_cache_corrupted"; then
1023   { echo "$as_me:1023: error: changes in the environment can compromise the build" >&5
1024 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1025   { { echo "$as_me:1025: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1026 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1027    { (exit 1); exit 1; }; }
1028 fi
1029
1030 ac_ext=c
1031 ac_cpp='$CPP $CPPFLAGS'
1032 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1033 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1034 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1035 ac_main_return="return"
1036
1037 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1038   *c*,-n*) ECHO_N=
1039            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1040            ECHO_T='     '
1041            ;;
1042   *c*,*  ) ECHO_N=-n
1043            ECHO_C=
1044            ECHO_T=
1045            ;;
1046   *)       ECHO_N=
1047            ECHO_C='\c'
1048            ECHO_T=
1049            ;;
1050 esac
1051 echo "#! $SHELL" >conftest.sh
1052 echo  "exit 0"   >>conftest.sh
1053 chmod +x conftest.sh
1054 if { (echo "$as_me:1054: PATH=\".;.\"; conftest.sh") >&5
1055   (PATH=".;."; conftest.sh) 2>&5
1056   ac_status=$?
1057   echo "$as_me:1057: \$? = $ac_status" >&5
1058   (exit "$ac_status"); }; then
1059   ac_path_separator=';'
1060 else
1061   ac_path_separator=:
1062 fi
1063 PATH_SEPARATOR="$ac_path_separator"
1064 rm -f conftest.sh
1065
1066 ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1067
1068 test "$program_prefix" != NONE &&
1069   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1070 # Use a double $ so make ignores it.
1071 test "$program_suffix" != NONE &&
1072   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1073 # Double any \ or $.  echo might interpret backslashes.
1074 # By default was `s,x,x', remove it if useless.
1075 cat <<\_ACEOF >conftest.sed
1076 s/[\\$]/&&/g;s/;s,x,x,$//
1077 _ACEOF
1078 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1079 rm conftest.sed
1080
1081 DESTDIR=
1082
1083 ac_aux_dir=
1084 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1085   if test -f "$ac_dir/install-sh"; then
1086     ac_aux_dir=$ac_dir
1087     ac_install_sh="$ac_aux_dir/install-sh -c"
1088     break
1089   elif test -f "$ac_dir/install.sh"; then
1090     ac_aux_dir=$ac_dir
1091     ac_install_sh="$ac_aux_dir/install.sh -c"
1092     break
1093   elif test -f "$ac_dir/shtool"; then
1094     ac_aux_dir=$ac_dir
1095     ac_install_sh="$ac_aux_dir/shtool install -c"
1096     break
1097   fi
1098 done
1099 if test -z "$ac_aux_dir"; then
1100   { { echo "$as_me:1100: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1101 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1102    { (exit 1); exit 1; }; }
1103 fi
1104 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1105 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1106 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1107
1108 # Make sure we can run config.sub.
1109 $ac_config_sub sun4 >/dev/null 2>&1 ||
1110   { { echo "$as_me:1110: error: cannot run $ac_config_sub" >&5
1111 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1112    { (exit 1); exit 1; }; }
1113
1114 echo "$as_me:1114: checking build system type" >&5
1115 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1116 if test "${ac_cv_build+set}" = set; then
1117   echo $ECHO_N "(cached) $ECHO_C" >&6
1118 else
1119   ac_cv_build_alias=$build_alias
1120 test -z "$ac_cv_build_alias" &&
1121   ac_cv_build_alias=`$ac_config_guess`
1122 test -z "$ac_cv_build_alias" &&
1123   { { echo "$as_me:1123: error: cannot guess build type; you must specify one" >&5
1124 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1125    { (exit 1); exit 1; }; }
1126 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1127   { { echo "$as_me:1127: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1128 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1129    { (exit 1); exit 1; }; }
1130
1131 fi
1132 echo "$as_me:1132: result: $ac_cv_build" >&5
1133 echo "${ECHO_T}$ac_cv_build" >&6
1134 build=$ac_cv_build
1135 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1136 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1137 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1138
1139 echo "$as_me:1139: checking host system type" >&5
1140 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1141 if test "${ac_cv_host+set}" = set; then
1142   echo $ECHO_N "(cached) $ECHO_C" >&6
1143 else
1144   ac_cv_host_alias=$host_alias
1145 test -z "$ac_cv_host_alias" &&
1146   ac_cv_host_alias=$ac_cv_build_alias
1147 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1148   { { echo "$as_me:1148: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1149 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1150    { (exit 1); exit 1; }; }
1151
1152 fi
1153 echo "$as_me:1153: result: $ac_cv_host" >&5
1154 echo "${ECHO_T}$ac_cv_host" >&6
1155 host=$ac_cv_host
1156 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1157 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1158 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1159
1160 ac_ext=c
1161 ac_cpp='$CPP $CPPFLAGS'
1162 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1163 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1164 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1165 ac_main_return="return"
1166 if test -n "$ac_tool_prefix"; then
1167   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1168 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1169 echo "$as_me:1169: checking for $ac_word" >&5
1170 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1171 if test "${ac_cv_prog_CC+set}" = set; then
1172   echo $ECHO_N "(cached) $ECHO_C" >&6
1173 else
1174   if test -n "$CC"; then
1175   ac_cv_prog_CC="$CC" # Let the user override the test.
1176 else
1177   ac_save_IFS=$IFS; IFS=$ac_path_separator
1178 ac_dummy="$PATH"
1179 for ac_dir in $ac_dummy; do
1180   IFS=$ac_save_IFS
1181   test -z "$ac_dir" && ac_dir=.
1182   $as_executable_p "$ac_dir/$ac_word" || continue
1183 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1184 echo "$as_me:1184: found $ac_dir/$ac_word" >&5
1185 break
1186 done
1187
1188 fi
1189 fi
1190 CC=$ac_cv_prog_CC
1191 if test -n "$CC"; then
1192   echo "$as_me:1192: result: $CC" >&5
1193 echo "${ECHO_T}$CC" >&6
1194 else
1195   echo "$as_me:1195: result: no" >&5
1196 echo "${ECHO_T}no" >&6
1197 fi
1198
1199 fi
1200 if test -z "$ac_cv_prog_CC"; then
1201   ac_ct_CC=$CC
1202   # Extract the first word of "gcc", so it can be a program name with args.
1203 set dummy gcc; ac_word=$2
1204 echo "$as_me:1204: checking for $ac_word" >&5
1205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1206 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1207   echo $ECHO_N "(cached) $ECHO_C" >&6
1208 else
1209   if test -n "$ac_ct_CC"; then
1210   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1211 else
1212   ac_save_IFS=$IFS; IFS=$ac_path_separator
1213 ac_dummy="$PATH"
1214 for ac_dir in $ac_dummy; do
1215   IFS=$ac_save_IFS
1216   test -z "$ac_dir" && ac_dir=.
1217   $as_executable_p "$ac_dir/$ac_word" || continue
1218 ac_cv_prog_ac_ct_CC="gcc"
1219 echo "$as_me:1219: found $ac_dir/$ac_word" >&5
1220 break
1221 done
1222
1223 fi
1224 fi
1225 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1226 if test -n "$ac_ct_CC"; then
1227   echo "$as_me:1227: result: $ac_ct_CC" >&5
1228 echo "${ECHO_T}$ac_ct_CC" >&6
1229 else
1230   echo "$as_me:1230: result: no" >&5
1231 echo "${ECHO_T}no" >&6
1232 fi
1233
1234   CC=$ac_ct_CC
1235 else
1236   CC="$ac_cv_prog_CC"
1237 fi
1238
1239 if test -z "$CC"; then
1240   if test -n "$ac_tool_prefix"; then
1241   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1242 set dummy ${ac_tool_prefix}cc; ac_word=$2
1243 echo "$as_me:1243: checking for $ac_word" >&5
1244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1245 if test "${ac_cv_prog_CC+set}" = set; then
1246   echo $ECHO_N "(cached) $ECHO_C" >&6
1247 else
1248   if test -n "$CC"; then
1249   ac_cv_prog_CC="$CC" # Let the user override the test.
1250 else
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   $as_executable_p "$ac_dir/$ac_word" || continue
1257 ac_cv_prog_CC="${ac_tool_prefix}cc"
1258 echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259 break
1260 done
1261
1262 fi
1263 fi
1264 CC=$ac_cv_prog_CC
1265 if test -n "$CC"; then
1266   echo "$as_me:1266: result: $CC" >&5
1267 echo "${ECHO_T}$CC" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273 fi
1274 if test -z "$ac_cv_prog_CC"; then
1275   ac_ct_CC=$CC
1276   # Extract the first word of "cc", so it can be a program name with args.
1277 set dummy cc; ac_word=$2
1278 echo "$as_me:1278: checking for $ac_word" >&5
1279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1280 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1281   echo $ECHO_N "(cached) $ECHO_C" >&6
1282 else
1283   if test -n "$ac_ct_CC"; then
1284   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1285 else
1286   ac_save_IFS=$IFS; IFS=$ac_path_separator
1287 ac_dummy="$PATH"
1288 for ac_dir in $ac_dummy; do
1289   IFS=$ac_save_IFS
1290   test -z "$ac_dir" && ac_dir=.
1291   $as_executable_p "$ac_dir/$ac_word" || continue
1292 ac_cv_prog_ac_ct_CC="cc"
1293 echo "$as_me:1293: found $ac_dir/$ac_word" >&5
1294 break
1295 done
1296
1297 fi
1298 fi
1299 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1300 if test -n "$ac_ct_CC"; then
1301   echo "$as_me:1301: result: $ac_ct_CC" >&5
1302 echo "${ECHO_T}$ac_ct_CC" >&6
1303 else
1304   echo "$as_me:1304: result: no" >&5
1305 echo "${ECHO_T}no" >&6
1306 fi
1307
1308   CC=$ac_ct_CC
1309 else
1310   CC="$ac_cv_prog_CC"
1311 fi
1312
1313 fi
1314 if test -z "$CC"; then
1315   # Extract the first word of "cc", so it can be a program name with args.
1316 set dummy cc; ac_word=$2
1317 echo "$as_me:1317: checking for $ac_word" >&5
1318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1319 if test "${ac_cv_prog_CC+set}" = set; then
1320   echo $ECHO_N "(cached) $ECHO_C" >&6
1321 else
1322   if test -n "$CC"; then
1323   ac_cv_prog_CC="$CC" # Let the user override the test.
1324 else
1325   ac_prog_rejected=no
1326   ac_save_IFS=$IFS; IFS=$ac_path_separator
1327 ac_dummy="$PATH"
1328 for ac_dir in $ac_dummy; do
1329   IFS=$ac_save_IFS
1330   test -z "$ac_dir" && ac_dir=.
1331   $as_executable_p "$ac_dir/$ac_word" || continue
1332 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1333   ac_prog_rejected=yes
1334   continue
1335 fi
1336 ac_cv_prog_CC="cc"
1337 echo "$as_me:1337: found $ac_dir/$ac_word" >&5
1338 break
1339 done
1340
1341 if test "$ac_prog_rejected" = yes; then
1342   # We found a bogon in the path, so make sure we never use it.
1343   set dummy $ac_cv_prog_CC
1344   shift
1345   if test $# != 0; then
1346     # We chose a different compiler from the bogus one.
1347     # However, it has the same basename, so the bogon will be chosen
1348     # first if we set CC to just the basename; use the full file name.
1349     shift
1350     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1351     shift
1352     ac_cv_prog_CC="$@"
1353   fi
1354 fi
1355 fi
1356 fi
1357 CC=$ac_cv_prog_CC
1358 if test -n "$CC"; then
1359   echo "$as_me:1359: result: $CC" >&5
1360 echo "${ECHO_T}$CC" >&6
1361 else
1362   echo "$as_me:1362: result: no" >&5
1363 echo "${ECHO_T}no" >&6
1364 fi
1365
1366 fi
1367 if test -z "$CC"; then
1368   if test -n "$ac_tool_prefix"; then
1369   for ac_prog in cl
1370   do
1371     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1372 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1373 echo "$as_me:1373: checking for $ac_word" >&5
1374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1375 if test "${ac_cv_prog_CC+set}" = set; then
1376   echo $ECHO_N "(cached) $ECHO_C" >&6
1377 else
1378   if test -n "$CC"; then
1379   ac_cv_prog_CC="$CC" # Let the user override the test.
1380 else
1381   ac_save_IFS=$IFS; IFS=$ac_path_separator
1382 ac_dummy="$PATH"
1383 for ac_dir in $ac_dummy; do
1384   IFS=$ac_save_IFS
1385   test -z "$ac_dir" && ac_dir=.
1386   $as_executable_p "$ac_dir/$ac_word" || continue
1387 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1388 echo "$as_me:1388: found $ac_dir/$ac_word" >&5
1389 break
1390 done
1391
1392 fi
1393 fi
1394 CC=$ac_cv_prog_CC
1395 if test -n "$CC"; then
1396   echo "$as_me:1396: result: $CC" >&5
1397 echo "${ECHO_T}$CC" >&6
1398 else
1399   echo "$as_me:1399: result: no" >&5
1400 echo "${ECHO_T}no" >&6
1401 fi
1402
1403     test -n "$CC" && break
1404   done
1405 fi
1406 if test -z "$CC"; then
1407   ac_ct_CC=$CC
1408   for ac_prog in cl
1409 do
1410   # Extract the first word of "$ac_prog", so it can be a program name with args.
1411 set dummy $ac_prog; ac_word=$2
1412 echo "$as_me:1412: checking for $ac_word" >&5
1413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1414 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1415   echo $ECHO_N "(cached) $ECHO_C" >&6
1416 else
1417   if test -n "$ac_ct_CC"; then
1418   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1419 else
1420   ac_save_IFS=$IFS; IFS=$ac_path_separator
1421 ac_dummy="$PATH"
1422 for ac_dir in $ac_dummy; do
1423   IFS=$ac_save_IFS
1424   test -z "$ac_dir" && ac_dir=.
1425   $as_executable_p "$ac_dir/$ac_word" || continue
1426 ac_cv_prog_ac_ct_CC="$ac_prog"
1427 echo "$as_me:1427: found $ac_dir/$ac_word" >&5
1428 break
1429 done
1430
1431 fi
1432 fi
1433 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1434 if test -n "$ac_ct_CC"; then
1435   echo "$as_me:1435: result: $ac_ct_CC" >&5
1436 echo "${ECHO_T}$ac_ct_CC" >&6
1437 else
1438   echo "$as_me:1438: result: no" >&5
1439 echo "${ECHO_T}no" >&6
1440 fi
1441
1442   test -n "$ac_ct_CC" && break
1443 done
1444
1445   CC=$ac_ct_CC
1446 fi
1447
1448 fi
1449
1450 test -z "$CC" && { { echo "$as_me:1450: error: no acceptable cc found in \$PATH" >&5
1451 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1452    { (exit 1); exit 1; }; }
1453
1454 # Provide some information about the compiler.
1455 echo "$as_me:1455:" \
1456      "checking for C compiler version" >&5
1457 ac_compiler=`set X $ac_compile; echo "$2"`
1458 { (eval echo "$as_me:1458: \"$ac_compiler --version </dev/null >&5\"") >&5
1459   (eval $ac_compiler --version </dev/null >&5) 2>&5
1460   ac_status=$?
1461   echo "$as_me:1461: \$? = $ac_status" >&5
1462   (exit "$ac_status"); }
1463 { (eval echo "$as_me:1463: \"$ac_compiler -v </dev/null >&5\"") >&5
1464   (eval $ac_compiler -v </dev/null >&5) 2>&5
1465   ac_status=$?
1466   echo "$as_me:1466: \$? = $ac_status" >&5
1467   (exit "$ac_status"); }
1468 { (eval echo "$as_me:1468: \"$ac_compiler -V </dev/null >&5\"") >&5
1469   (eval $ac_compiler -V </dev/null >&5) 2>&5
1470   ac_status=$?
1471   echo "$as_me:1471: \$? = $ac_status" >&5
1472   (exit "$ac_status"); }
1473
1474 cat >"conftest.$ac_ext" <<_ACEOF
1475 #line 1475 "configure"
1476 #include "confdefs.h"
1477
1478 int
1479 main (void)
1480 {
1481
1482   ;
1483   return 0;
1484 }
1485 _ACEOF
1486 ac_clean_files_save=$ac_clean_files
1487 ac_clean_files="$ac_clean_files a.out a.exe"
1488 # Try to create an executable without -o first, disregard a.out.
1489 # It will help us diagnose broken compilers, and finding out an intuition
1490 # of exeext.
1491 echo "$as_me:1491: checking for C compiler default output" >&5
1492 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1493 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1494 if { (eval echo "$as_me:1494: \"$ac_link_default\"") >&5
1495   (eval $ac_link_default) 2>&5
1496   ac_status=$?
1497   echo "$as_me:1497: \$? = $ac_status" >&5
1498   (exit "$ac_status"); }; then
1499   # Find the output, starting from the most likely.  This scheme is
1500 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1501 # resort.
1502 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1503                 ls a.out conftest 2>/dev/null;
1504                 ls a.* conftest.* 2>/dev/null`; do
1505   case $ac_file in
1506     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1507     a.out ) # We found the default executable, but exeext='' is most
1508             # certainly right.
1509             break;;
1510     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1511           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512           export ac_cv_exeext
1513           break;;
1514     * ) break;;
1515   esac
1516 done
1517 else
1518   echo "$as_me: failed program was:" >&5
1519 cat "conftest.$ac_ext" >&5
1520 { { echo "$as_me:1520: error: C compiler cannot create executables" >&5
1521 echo "$as_me: error: C compiler cannot create executables" >&2;}
1522    { (exit 77); exit 77; }; }
1523 fi
1524
1525 ac_exeext=$ac_cv_exeext
1526 echo "$as_me:1526: result: $ac_file" >&5
1527 echo "${ECHO_T}$ac_file" >&6
1528
1529 # Check the compiler produces executables we can run.  If not, either
1530 # the compiler is broken, or we cross compile.
1531 echo "$as_me:1531: checking whether the C compiler works" >&5
1532 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1533 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1534 # If not cross compiling, check that we can run a simple program.
1535 if test "$cross_compiling" != yes; then
1536   if { ac_try='./$ac_file'
1537   { (eval echo "$as_me:1537: \"$ac_try\"") >&5
1538   (eval $ac_try) 2>&5
1539   ac_status=$?
1540   echo "$as_me:1540: \$? = $ac_status" >&5
1541   (exit "$ac_status"); }; }; then
1542     cross_compiling=no
1543   else
1544     if test "$cross_compiling" = maybe; then
1545         cross_compiling=yes
1546     else
1547         { { echo "$as_me:1547: error: cannot run C compiled programs.
1548 If you meant to cross compile, use \`--host'." >&5
1549 echo "$as_me: error: cannot run C compiled programs.
1550 If you meant to cross compile, use \`--host'." >&2;}
1551    { (exit 1); exit 1; }; }
1552     fi
1553   fi
1554 fi
1555 echo "$as_me:1555: result: yes" >&5
1556 echo "${ECHO_T}yes" >&6
1557
1558 rm -f a.out a.exe "conftest$ac_cv_exeext"
1559 ac_clean_files=$ac_clean_files_save
1560 # Check the compiler produces executables we can run.  If not, either
1561 # the compiler is broken, or we cross compile.
1562 echo "$as_me:1562: checking whether we are cross compiling" >&5
1563 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1564 echo "$as_me:1564: result: $cross_compiling" >&5
1565 echo "${ECHO_T}$cross_compiling" >&6
1566
1567 echo "$as_me:1567: checking for executable suffix" >&5
1568 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1569 if { (eval echo "$as_me:1569: \"$ac_link\"") >&5
1570   (eval $ac_link) 2>&5
1571   ac_status=$?
1572   echo "$as_me:1572: \$? = $ac_status" >&5
1573   (exit "$ac_status"); }; then
1574   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1575 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1576 # work properly (i.e., refer to `conftest.exe'), while it won't with
1577 # `rm'.
1578 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1579   case $ac_file in
1580     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1581     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582           export ac_cv_exeext
1583           break;;
1584     * ) break;;
1585   esac
1586 done
1587 else
1588   { { echo "$as_me:1588: error: cannot compute EXEEXT: cannot compile and link" >&5
1589 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1590    { (exit 1); exit 1; }; }
1591 fi
1592
1593 rm -f "conftest$ac_cv_exeext"
1594 echo "$as_me:1594: result: $ac_cv_exeext" >&5
1595 echo "${ECHO_T}$ac_cv_exeext" >&6
1596
1597 rm -f "conftest.$ac_ext"
1598 EXEEXT=$ac_cv_exeext
1599 ac_exeext=$EXEEXT
1600 echo "$as_me:1600: checking for object suffix" >&5
1601 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1602 if test "${ac_cv_objext+set}" = set; then
1603   echo $ECHO_N "(cached) $ECHO_C" >&6
1604 else
1605   cat >"conftest.$ac_ext" <<_ACEOF
1606 #line 1606 "configure"
1607 #include "confdefs.h"
1608
1609 int
1610 main (void)
1611 {
1612
1613   ;
1614   return 0;
1615 }
1616 _ACEOF
1617 rm -f conftest.o conftest.obj
1618 if { (eval echo "$as_me:1618: \"$ac_compile\"") >&5
1619   (eval $ac_compile) 2>&5
1620   ac_status=$?
1621   echo "$as_me:1621: \$? = $ac_status" >&5
1622   (exit "$ac_status"); }; then
1623   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1624   case $ac_file in
1625     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1626     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1627        break;;
1628   esac
1629 done
1630 else
1631   echo "$as_me: failed program was:" >&5
1632 cat "conftest.$ac_ext" >&5
1633 { { echo "$as_me:1633: error: cannot compute OBJEXT: cannot compile" >&5
1634 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1635    { (exit 1); exit 1; }; }
1636 fi
1637
1638 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1639 fi
1640 echo "$as_me:1640: result: $ac_cv_objext" >&5
1641 echo "${ECHO_T}$ac_cv_objext" >&6
1642 OBJEXT=$ac_cv_objext
1643 ac_objext=$OBJEXT
1644 echo "$as_me:1644: checking whether we are using the GNU C compiler" >&5
1645 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1646 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   cat >"conftest.$ac_ext" <<_ACEOF
1650 #line 1650 "configure"
1651 #include "confdefs.h"
1652
1653 int
1654 main (void)
1655 {
1656 #ifndef __GNUC__
1657        choke me
1658 #endif
1659
1660   ;
1661   return 0;
1662 }
1663 _ACEOF
1664 rm -f "conftest.$ac_objext"
1665 if { (eval echo "$as_me:1665: \"$ac_compile\"") >&5
1666   (eval $ac_compile) 2>&5
1667   ac_status=$?
1668   echo "$as_me:1668: \$? = $ac_status" >&5
1669   (exit "$ac_status"); } &&
1670          { ac_try='test -s "conftest.$ac_objext"'
1671   { (eval echo "$as_me:1671: \"$ac_try\"") >&5
1672   (eval $ac_try) 2>&5
1673   ac_status=$?
1674   echo "$as_me:1674: \$? = $ac_status" >&5
1675   (exit "$ac_status"); }; }; then
1676   ac_compiler_gnu=yes
1677 else
1678   echo "$as_me: failed program was:" >&5
1679 cat "conftest.$ac_ext" >&5
1680 ac_compiler_gnu=no
1681 fi
1682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1683 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1684
1685 fi
1686 echo "$as_me:1686: result: $ac_cv_c_compiler_gnu" >&5
1687 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1688 GCC=`test $ac_compiler_gnu = yes && echo yes`
1689 ac_test_CFLAGS=${CFLAGS+set}
1690 ac_save_CFLAGS=$CFLAGS
1691 CFLAGS="-g"
1692 echo "$as_me:1692: checking whether $CC accepts -g" >&5
1693 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1694 if test "${ac_cv_prog_cc_g+set}" = set; then
1695   echo $ECHO_N "(cached) $ECHO_C" >&6
1696 else
1697   cat >"conftest.$ac_ext" <<_ACEOF
1698 #line 1698 "configure"
1699 #include "confdefs.h"
1700
1701 int
1702 main (void)
1703 {
1704
1705   ;
1706   return 0;
1707 }
1708 _ACEOF
1709 rm -f "conftest.$ac_objext"
1710 if { (eval echo "$as_me:1710: \"$ac_compile\"") >&5
1711   (eval $ac_compile) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit "$ac_status"); } &&
1715          { ac_try='test -s "conftest.$ac_objext"'
1716   { (eval echo "$as_me:1716: \"$ac_try\"") >&5
1717   (eval $ac_try) 2>&5
1718   ac_status=$?
1719   echo "$as_me:1719: \$? = $ac_status" >&5
1720   (exit "$ac_status"); }; }; then
1721   ac_cv_prog_cc_g=yes
1722 else
1723   echo "$as_me: failed program was:" >&5
1724 cat "conftest.$ac_ext" >&5
1725 ac_cv_prog_cc_g=no
1726 fi
1727 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1728 fi
1729 echo "$as_me:1729: result: $ac_cv_prog_cc_g" >&5
1730 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1731 if test "$ac_test_CFLAGS" = set; then
1732   CFLAGS=$ac_save_CFLAGS
1733 elif test $ac_cv_prog_cc_g = yes; then
1734   if test "$GCC" = yes; then
1735     CFLAGS="-g -O2"
1736   else
1737     CFLAGS="-g"
1738   fi
1739 else
1740   if test "$GCC" = yes; then
1741     CFLAGS="-O2"
1742   else
1743     CFLAGS=
1744   fi
1745 fi
1746 # Some people use a C++ compiler to compile C.  Since we use `exit',
1747 # in C++ we need to declare it.  In case someone uses the same compiler
1748 # for both compiling C and C++ we need to have the C++ compiler decide
1749 # the declaration of exit, since it's the most demanding environment.
1750 cat >"conftest.$ac_ext" <<_ACEOF
1751 #ifndef __cplusplus
1752   choke me
1753 #endif
1754 _ACEOF
1755 rm -f "conftest.$ac_objext"
1756 if { (eval echo "$as_me:1756: \"$ac_compile\"") >&5
1757   (eval $ac_compile) 2>&5
1758   ac_status=$?
1759   echo "$as_me:1759: \$? = $ac_status" >&5
1760   (exit "$ac_status"); } &&
1761          { ac_try='test -s "conftest.$ac_objext"'
1762   { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763   (eval $ac_try) 2>&5
1764   ac_status=$?
1765   echo "$as_me:1765: \$? = $ac_status" >&5
1766   (exit "$ac_status"); }; }; then
1767   for ac_declaration in \
1768    ''\
1769    '#include <stdlib.h>' \
1770    'extern "C" void std::exit (int) throw (); using std::exit;' \
1771    'extern "C" void std::exit (int); using std::exit;' \
1772    'extern "C" void exit (int) throw ();' \
1773    'extern "C" void exit (int);' \
1774    'void exit (int);'
1775 do
1776   cat >"conftest.$ac_ext" <<_ACEOF
1777 #line 1777 "configure"
1778 #include "confdefs.h"
1779 #include <stdlib.h>
1780 $ac_declaration
1781 int
1782 main (void)
1783 {
1784 exit (42);
1785   ;
1786   return 0;
1787 }
1788 _ACEOF
1789 rm -f "conftest.$ac_objext"
1790 if { (eval echo "$as_me:1790: \"$ac_compile\"") >&5
1791   (eval $ac_compile) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit "$ac_status"); } &&
1795          { ac_try='test -s "conftest.$ac_objext"'
1796   { (eval echo "$as_me:1796: \"$ac_try\"") >&5
1797   (eval $ac_try) 2>&5
1798   ac_status=$?
1799   echo "$as_me:1799: \$? = $ac_status" >&5
1800   (exit "$ac_status"); }; }; then
1801   :
1802 else
1803   echo "$as_me: failed program was:" >&5
1804 cat "conftest.$ac_ext" >&5
1805 continue
1806 fi
1807 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1808   cat >"conftest.$ac_ext" <<_ACEOF
1809 #line 1809 "configure"
1810 #include "confdefs.h"
1811 $ac_declaration
1812 int
1813 main (void)
1814 {
1815 exit (42);
1816   ;
1817   return 0;
1818 }
1819 _ACEOF
1820 rm -f "conftest.$ac_objext"
1821 if { (eval echo "$as_me:1821: \"$ac_compile\"") >&5
1822   (eval $ac_compile) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit "$ac_status"); } &&
1826          { ac_try='test -s "conftest.$ac_objext"'
1827   { (eval echo "$as_me:1827: \"$ac_try\"") >&5
1828   (eval $ac_try) 2>&5
1829   ac_status=$?
1830   echo "$as_me:1830: \$? = $ac_status" >&5
1831   (exit "$ac_status"); }; }; then
1832   break
1833 else
1834   echo "$as_me: failed program was:" >&5
1835 cat "conftest.$ac_ext" >&5
1836 fi
1837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1838 done
1839 rm -rf conftest*
1840 if test -n "$ac_declaration"; then
1841   echo '#ifdef __cplusplus' >>confdefs.h
1842   echo "$ac_declaration"    >>confdefs.h
1843   echo '#endif'             >>confdefs.h
1844 fi
1845
1846 else
1847   echo "$as_me: failed program was:" >&5
1848 cat "conftest.$ac_ext" >&5
1849 fi
1850 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1851 ac_ext=c
1852 ac_cpp='$CPP $CPPFLAGS'
1853 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1854 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1855 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1856 ac_main_return="return"
1857
1858 GCC_VERSION=none
1859 if test "$GCC" = yes ; then
1860         echo "$as_me:1860: checking version of $CC" >&5
1861 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1862         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.].*//'`"
1863         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1864         echo "$as_me:1864: result: $GCC_VERSION" >&5
1865 echo "${ECHO_T}$GCC_VERSION" >&6
1866 fi
1867
1868 INTEL_COMPILER=no
1869
1870 if test "$GCC" = yes ; then
1871         case "$host_os" in
1872         (linux*|gnu*)
1873                 echo "$as_me:1873: checking if this is really Intel C compiler" >&5
1874 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1875                 cf_save_CFLAGS="$CFLAGS"
1876                 CFLAGS="$CFLAGS -no-gcc"
1877                 cat >"conftest.$ac_ext" <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main (void)
1883 {
1884
1885 #ifdef __INTEL_COMPILER
1886 #else
1887 make an error
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f "conftest.$ac_objext"
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit "$ac_status"); } &&
1900          { ac_try='test -s "conftest.$ac_objext"'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit "$ac_status"); }; }; then
1906   INTEL_COMPILER=yes
1907 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1908
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat "conftest.$ac_ext" >&5
1912 fi
1913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1914                 CFLAGS="$cf_save_CFLAGS"
1915                 echo "$as_me:1915: result: $INTEL_COMPILER" >&5
1916 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917                 ;;
1918         esac
1919 fi
1920
1921 CLANG_COMPILER=no
1922
1923 if test "$GCC" = yes ; then
1924         echo "$as_me:1924: checking if this is really Clang C compiler" >&5
1925 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1926         cf_save_CFLAGS="$CFLAGS"
1927         cat >"conftest.$ac_ext" <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main (void)
1933 {
1934
1935 #ifdef __clang__
1936 #else
1937 make an error
1938 #endif
1939
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 rm -f "conftest.$ac_objext"
1945 if { (eval echo "$as_me:1945: \"$ac_compile\"") >&5
1946   (eval $ac_compile) 2>&5
1947   ac_status=$?
1948   echo "$as_me:1948: \$? = $ac_status" >&5
1949   (exit "$ac_status"); } &&
1950          { ac_try='test -s "conftest.$ac_objext"'
1951   { (eval echo "$as_me:1951: \"$ac_try\"") >&5
1952   (eval $ac_try) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit "$ac_status"); }; }; then
1956   CLANG_COMPILER=yes
1957
1958 else
1959   echo "$as_me: failed program was:" >&5
1960 cat "conftest.$ac_ext" >&5
1961 fi
1962 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1963         CFLAGS="$cf_save_CFLAGS"
1964         echo "$as_me:1964: result: $CLANG_COMPILER" >&5
1965 echo "${ECHO_T}$CLANG_COMPILER" >&6
1966 fi
1967
1968 CLANG_VERSION=none
1969
1970 if test "x$CLANG_COMPILER" = "xyes" ; then
1971         case "$CC" in
1972         (c[1-9][0-9]|*/c[1-9][0-9])
1973                 { echo "$as_me:1973: WARNING: replacing broken compiler alias $CC" >&5
1974 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1975                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1976                 CC=clang
1977                 ;;
1978         esac
1979
1980         echo "$as_me:1980: checking version of $CC" >&5
1981 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1982         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1983         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1984         echo "$as_me:1984: result: $CLANG_VERSION" >&5
1985 echo "${ECHO_T}$CLANG_VERSION" >&6
1986
1987         for cf_clang_opt in \
1988                 -Qunused-arguments \
1989                 -Wno-error=implicit-function-declaration
1990         do
1991                 echo "$as_me:1991: checking if option $cf_clang_opt works" >&5
1992 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1993                 cf_save_CFLAGS="$CFLAGS"
1994                 CFLAGS="$CFLAGS $cf_clang_opt"
1995                 cat >"conftest.$ac_ext" <<_ACEOF
1996 #line 1996 "configure"
1997 #include "confdefs.h"
1998
1999                         #include <stdio.h>
2000 int
2001 main (void)
2002 {
2003
2004                         printf("hello!\\n");
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2010 if { (eval echo "$as_me:2010: \"$ac_link\"") >&5
2011   (eval $ac_link) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit "$ac_status"); } &&
2015          { ac_try='test -s "conftest$ac_exeext"'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit "$ac_status"); }; }; then
2021
2022                         cf_clang_optok=yes
2023 else
2024   echo "$as_me: failed program was:" >&5
2025 cat "conftest.$ac_ext" >&5
2026
2027                         cf_clang_optok=no
2028 fi
2029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2030                 echo "$as_me:2030: result: $cf_clang_optok" >&5
2031 echo "${ECHO_T}$cf_clang_optok" >&6
2032                 CFLAGS="$cf_save_CFLAGS"
2033                 if test "$cf_clang_optok" = yes; then
2034                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2035
2036 echo "${as_me:-configure}:2036: testing adding option $cf_clang_opt ..." 1>&5
2037
2038         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2039         CFLAGS="${CFLAGS}$cf_clang_opt"
2040
2041                 fi
2042         done
2043 fi
2044
2045 echo "$as_me:2045: checking for $CC option to accept ANSI C" >&5
2046 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2047 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2048   echo $ECHO_N "(cached) $ECHO_C" >&6
2049 else
2050   ac_cv_prog_cc_stdc=no
2051 ac_save_CC=$CC
2052 cat >"conftest.$ac_ext" <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055 #include <stdarg.h>
2056 #include <stdio.h>
2057 #include <sys/types.h>
2058 #include <sys/stat.h>
2059 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2060 struct buf { int x; };
2061 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2062 static char *e (p, i)
2063      char **p;
2064      int i;
2065 {
2066   return p[i];
2067 }
2068 static char *f (char * (*g) (char **, int), char **p, ...)
2069 {
2070   char *s;
2071   va_list v;
2072   va_start (v,p);
2073   s = g (p, va_arg (v,int));
2074   va_end (v);
2075   return s;
2076 }
2077 int test (int i, double x);
2078 struct s1 {int (*f) (int a);};
2079 struct s2 {int (*f) (double a);};
2080 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2081 int argc;
2082 char **argv;
2083 int
2084 main (void)
2085 {
2086 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2087   ;
2088   return 0;
2089 }
2090 _ACEOF
2091 # Don't try gcc -ansi; that turns off useful extensions and
2092 # breaks some systems' header files.
2093 # AIX                   -qlanglvl=ansi
2094 # Ultrix and OSF/1      -std1
2095 # HP-UX 10.20 and later -Ae
2096 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2097 # SVR4                  -Xc -D__EXTENSIONS__
2098 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2099 do
2100   CC="$ac_save_CC $ac_arg"
2101   rm -f "conftest.$ac_objext"
2102 if { (eval echo "$as_me:2102: \"$ac_compile\"") >&5
2103   (eval $ac_compile) 2>&5
2104   ac_status=$?
2105   echo "$as_me:2105: \$? = $ac_status" >&5
2106   (exit "$ac_status"); } &&
2107          { ac_try='test -s "conftest.$ac_objext"'
2108   { (eval echo "$as_me:2108: \"$ac_try\"") >&5
2109   (eval $ac_try) 2>&5
2110   ac_status=$?
2111   echo "$as_me:2111: \$? = $ac_status" >&5
2112   (exit "$ac_status"); }; }; then
2113   ac_cv_prog_cc_stdc=$ac_arg
2114 break
2115 else
2116   echo "$as_me: failed program was:" >&5
2117 cat "conftest.$ac_ext" >&5
2118 fi
2119 rm -f "conftest.$ac_objext"
2120 done
2121 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2122 CC=$ac_save_CC
2123
2124 fi
2125
2126 case "x$ac_cv_prog_cc_stdc" in
2127   x|xno)
2128     echo "$as_me:2128: result: none needed" >&5
2129 echo "${ECHO_T}none needed" >&6 ;;
2130   *)
2131     echo "$as_me:2131: result: $ac_cv_prog_cc_stdc" >&5
2132 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2133     CC="$CC $ac_cv_prog_cc_stdc" ;;
2134 esac
2135
2136 # This should have been defined by AC_PROG_CC
2137 : "${CC:=cc}"
2138
2139 echo "$as_me:2139: checking \$CFLAGS variable" >&5
2140 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2141 case "x$CFLAGS" in
2142 (*-[IUD]*)
2143         echo "$as_me:2143: result: broken" >&5
2144 echo "${ECHO_T}broken" >&6
2145         { echo "$as_me:2145: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2146 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2147         cf_flags="$CFLAGS"
2148         CFLAGS=
2149         for cf_arg in $cf_flags
2150         do
2151
2152 cf_fix_cppflags=no
2153 cf_new_cflags=
2154 cf_new_cppflags=
2155 cf_new_extra_cppflags=
2156
2157 for cf_add_cflags in $cf_arg
2158 do
2159 case "$cf_fix_cppflags" in
2160 (no)
2161         case "$cf_add_cflags" in
2162         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2163                 case "$cf_add_cflags" in
2164                 (-D*)
2165                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2166
2167                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2168                                 && test -z "${cf_tst_cflags}" \
2169                                 && cf_fix_cppflags=yes
2170
2171                         if test "$cf_fix_cppflags" = yes ; then
2172
2173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2175
2176                                 continue
2177                         elif test "${cf_tst_cflags}" = "\"'" ; then
2178
2179         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2180         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2181
2182                                 continue
2183                         fi
2184                         ;;
2185                 esac
2186                 case "$CPPFLAGS" in
2187                 (*$cf_add_cflags)
2188                         ;;
2189                 (*)
2190                         case "$cf_add_cflags" in
2191                         (-D*)
2192                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2193
2194 CPPFLAGS=`echo "$CPPFLAGS" | \
2195         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2196                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2197
2198                                 ;;
2199                         esac
2200
2201         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2202         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2203
2204                         ;;
2205                 esac
2206                 ;;
2207         (*)
2208
2209         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2210         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2211
2212                 ;;
2213         esac
2214         ;;
2215 (yes)
2216
2217         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2218         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2219
2220         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2221
2222         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2223                 && test -z "${cf_tst_cflags}" \
2224                 && cf_fix_cppflags=no
2225         ;;
2226 esac
2227 done
2228
2229 if test -n "$cf_new_cflags" ; then
2230
2231         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2232         CFLAGS="${CFLAGS}$cf_new_cflags"
2233
2234 fi
2235
2236 if test -n "$cf_new_cppflags" ; then
2237
2238         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2239         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2240
2241 fi
2242
2243 if test -n "$cf_new_extra_cppflags" ; then
2244
2245         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2246         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2247
2248 fi
2249
2250         done
2251         ;;
2252 (*)
2253         echo "$as_me:2253: result: ok" >&5
2254 echo "${ECHO_T}ok" >&6
2255         ;;
2256 esac
2257
2258 echo "$as_me:2258: checking \$CC variable" >&5
2259 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2260 case "$CC" in
2261 (*[\ \  ]-*)
2262         echo "$as_me:2262: result: broken" >&5
2263 echo "${ECHO_T}broken" >&6
2264         { echo "$as_me:2264: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2265 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2266         # humor him...
2267         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2268         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2269         CC="$cf_prog"
2270         for cf_arg in $cf_flags
2271         do
2272                 case "x$cf_arg" in
2273                 (x-[IUDfgOW]*)
2274
2275 cf_fix_cppflags=no
2276 cf_new_cflags=
2277 cf_new_cppflags=
2278 cf_new_extra_cppflags=
2279
2280 for cf_add_cflags in $cf_arg
2281 do
2282 case "$cf_fix_cppflags" in
2283 (no)
2284         case "$cf_add_cflags" in
2285         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2286                 case "$cf_add_cflags" in
2287                 (-D*)
2288                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2289
2290                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2291                                 && test -z "${cf_tst_cflags}" \
2292                                 && cf_fix_cppflags=yes
2293
2294                         if test "$cf_fix_cppflags" = yes ; then
2295
2296         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2297         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2298
2299                                 continue
2300                         elif test "${cf_tst_cflags}" = "\"'" ; then
2301
2302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2304
2305                                 continue
2306                         fi
2307                         ;;
2308                 esac
2309                 case "$CPPFLAGS" in
2310                 (*$cf_add_cflags)
2311                         ;;
2312                 (*)
2313                         case "$cf_add_cflags" in
2314                         (-D*)
2315                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2316
2317 CPPFLAGS=`echo "$CPPFLAGS" | \
2318         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2319                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2320
2321                                 ;;
2322                         esac
2323
2324         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2325         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2326
2327                         ;;
2328                 esac
2329                 ;;
2330         (*)
2331
2332         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2333         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2334
2335                 ;;
2336         esac
2337         ;;
2338 (yes)
2339
2340         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2341         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2342
2343         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2344
2345         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2346                 && test -z "${cf_tst_cflags}" \
2347                 && cf_fix_cppflags=no
2348         ;;
2349 esac
2350 done
2351
2352 if test -n "$cf_new_cflags" ; then
2353
2354         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2355         CFLAGS="${CFLAGS}$cf_new_cflags"
2356
2357 fi
2358
2359 if test -n "$cf_new_cppflags" ; then
2360
2361         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2362         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2363
2364 fi
2365
2366 if test -n "$cf_new_extra_cppflags" ; then
2367
2368         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2369         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2370
2371 fi
2372
2373                         ;;
2374                 (*)
2375                         CC="$CC $cf_arg"
2376                         ;;
2377                 esac
2378         done
2379         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2380
2381 echo "${as_me:-configure}:2381: testing resulting CC: '$CC' ..." 1>&5
2382
2383         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2384
2385 echo "${as_me:-configure}:2385: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2386
2387         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2388
2389 echo "${as_me:-configure}:2389: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2390
2391         ;;
2392 (*)
2393         echo "$as_me:2393: result: ok" >&5
2394 echo "${ECHO_T}ok" >&6
2395         ;;
2396 esac
2397
2398 for ac_prog in ggrep grep
2399 do
2400   # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_prog_GREP+set}" = set; then
2405   echo $ECHO_N "(cached) $ECHO_C" >&6
2406 else
2407   if test -n "$GREP"; then
2408   ac_cv_prog_GREP="$GREP" # Let the user override the test.
2409 else
2410   ac_save_IFS=$IFS; IFS=$ac_path_separator
2411 ac_dummy="$PATH"
2412 for ac_dir in $ac_dummy; do
2413   IFS=$ac_save_IFS
2414   test -z "$ac_dir" && ac_dir=.
2415   $as_executable_p "$ac_dir/$ac_word" || continue
2416 ac_cv_prog_GREP="$ac_prog"
2417 echo "$as_me:2417: found $ac_dir/$ac_word" >&5
2418 break
2419 done
2420
2421 fi
2422 fi
2423 GREP=$ac_cv_prog_GREP
2424 if test -n "$GREP"; then
2425   echo "$as_me:2425: result: $GREP" >&5
2426 echo "${ECHO_T}$GREP" >&6
2427 else
2428   echo "$as_me:2428: result: no" >&5
2429 echo "${ECHO_T}no" >&6
2430 fi
2431
2432   test -n "$GREP" && break
2433 done
2434 test -n "$GREP" || GREP=": "
2435
2436 echo "$as_me:2436: checking for egrep" >&5
2437 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2438 if test "${ac_cv_path_EGREP+set}" = set; then
2439   echo $ECHO_N "(cached) $ECHO_C" >&6
2440 else
2441   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2442    then ac_cv_path_EGREP="$GREP -E"
2443    else
2444      for ac_prog in gegrep egrep
2445 do
2446   # Extract the first word of "$ac_prog", so it can be a program name with args.
2447 set dummy $ac_prog; ac_word=$2
2448 echo "$as_me:2448: checking for $ac_word" >&5
2449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2450 if test "${ac_cv_path_EGREP+set}" = set; then
2451   echo $ECHO_N "(cached) $ECHO_C" >&6
2452 else
2453   case $EGREP in
2454   [\\/]* | ?:[\\/]*)
2455   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2456   ;;
2457   *)
2458   ac_save_IFS=$IFS; IFS=$ac_path_separator
2459 ac_dummy="$PATH"
2460 for ac_dir in $ac_dummy; do
2461   IFS=$ac_save_IFS
2462   test -z "$ac_dir" && ac_dir=.
2463   if $as_executable_p "$ac_dir/$ac_word"; then
2464    ac_cv_path_EGREP="$ac_dir/$ac_word"
2465    echo "$as_me:2465: found $ac_dir/$ac_word" >&5
2466    break
2467 fi
2468 done
2469
2470   ;;
2471 esac
2472 fi
2473 EGREP=$ac_cv_path_EGREP
2474
2475 if test -n "$EGREP"; then
2476   echo "$as_me:2476: result: $EGREP" >&5
2477 echo "${ECHO_T}$EGREP" >&6
2478 else
2479   echo "$as_me:2479: result: no" >&5
2480 echo "${ECHO_T}no" >&6
2481 fi
2482
2483   test -n "$EGREP" && break
2484 done
2485 test -n "$EGREP" || EGREP=": "
2486
2487      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2487: error: cannot find workable egrep" >&5
2488 echo "$as_me: error: cannot find workable egrep" >&2;}
2489    { (exit 1); exit 1; }; }
2490    fi
2491 fi
2492 echo "$as_me:2492: result: $ac_cv_path_EGREP" >&5
2493 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2494  EGREP="$ac_cv_path_EGREP"
2495
2496 ac_ext=c
2497 ac_cpp='$CPP $CPPFLAGS'
2498 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2499 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2501 ac_main_return="return"
2502 echo "$as_me:2502: checking how to run the C preprocessor" >&5
2503 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2504 # On Suns, sometimes $CPP names a directory.
2505 if test -n "$CPP" && test -d "$CPP"; then
2506   CPP=
2507 fi
2508 if test -z "$CPP"; then
2509   if test "${ac_cv_prog_CPP+set}" = set; then
2510   echo $ECHO_N "(cached) $ECHO_C" >&6
2511 else
2512       # Double quotes because CPP needs to be expanded
2513     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2514     do
2515       ac_preproc_ok=false
2516 for ac_c_preproc_warn_flag in '' yes
2517 do
2518   # Use a header file that comes with gcc, so configuring glibc
2519   # with a fresh cross-compiler works.
2520   # On the NeXT, cc -E runs the code through the compiler's parser,
2521   # not just through cpp. "Syntax error" is here to catch this case.
2522   cat >"conftest.$ac_ext" <<_ACEOF
2523 #line 2523 "configure"
2524 #include "confdefs.h"
2525 #include <assert.h>
2526                      Syntax error
2527 _ACEOF
2528 if { (eval echo "$as_me:2528: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2529   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2530   ac_status=$?
2531   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2532   rm -f conftest.er1
2533   cat conftest.err >&5
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit "$ac_status"); } >/dev/null; then
2536   if test -s conftest.err; then
2537     ac_cpp_err=$ac_c_preproc_warn_flag
2538   else
2539     ac_cpp_err=
2540   fi
2541 else
2542   ac_cpp_err=yes
2543 fi
2544 if test -z "$ac_cpp_err"; then
2545   :
2546 else
2547   echo "$as_me: failed program was:" >&5
2548   cat "conftest.$ac_ext" >&5
2549   # Broken: fails on valid input.
2550 continue
2551 fi
2552 rm -f conftest.err "conftest.$ac_ext"
2553
2554   # OK, works on sane cases.  Now check whether non-existent headers
2555   # can be detected and how.
2556   cat >"conftest.$ac_ext" <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559 #include <ac_nonexistent.h>
2560 _ACEOF
2561 if { (eval echo "$as_me:2561: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2562   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2563   ac_status=$?
2564   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2565   rm -f conftest.er1
2566   cat conftest.err >&5
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); } >/dev/null; then
2569   if test -s conftest.err; then
2570     ac_cpp_err=$ac_c_preproc_warn_flag
2571   else
2572     ac_cpp_err=
2573   fi
2574 else
2575   ac_cpp_err=yes
2576 fi
2577 if test -z "$ac_cpp_err"; then
2578   # Broken: success on invalid input.
2579 continue
2580 else
2581   echo "$as_me: failed program was:" >&5
2582   cat "conftest.$ac_ext" >&5
2583   # Passes both tests.
2584 ac_preproc_ok=:
2585 break
2586 fi
2587 rm -f conftest.err "conftest.$ac_ext"
2588
2589 done
2590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2591 rm -f conftest.err "conftest.$ac_ext"
2592 if $ac_preproc_ok; then
2593   break
2594 fi
2595
2596     done
2597     ac_cv_prog_CPP=$CPP
2598
2599 fi
2600   CPP=$ac_cv_prog_CPP
2601 else
2602   ac_cv_prog_CPP=$CPP
2603 fi
2604 echo "$as_me:2604: result: $CPP" >&5
2605 echo "${ECHO_T}$CPP" >&6
2606 ac_preproc_ok=false
2607 for ac_c_preproc_warn_flag in '' yes
2608 do
2609   # Use a header file that comes with gcc, so configuring glibc
2610   # with a fresh cross-compiler works.
2611   # On the NeXT, cc -E runs the code through the compiler's parser,
2612   # not just through cpp. "Syntax error" is here to catch this case.
2613   cat >"conftest.$ac_ext" <<_ACEOF
2614 #line 2614 "configure"
2615 #include "confdefs.h"
2616 #include <assert.h>
2617                      Syntax error
2618 _ACEOF
2619 if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2621   ac_status=$?
2622   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit "$ac_status"); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   :
2637 else
2638   echo "$as_me: failed program was:" >&5
2639   cat "conftest.$ac_ext" >&5
2640   # Broken: fails on valid input.
2641 continue
2642 fi
2643 rm -f conftest.err "conftest.$ac_ext"
2644
2645   # OK, works on sane cases.  Now check whether non-existent headers
2646   # can be detected and how.
2647   cat >"conftest.$ac_ext" <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650 #include <ac_nonexistent.h>
2651 _ACEOF
2652 if { (eval echo "$as_me:2652: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2653   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2654   ac_status=$?
2655   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2656   rm -f conftest.er1
2657   cat conftest.err >&5
2658   echo "$as_me:2658: \$? = $ac_status" >&5
2659   (exit "$ac_status"); } >/dev/null; then
2660   if test -s conftest.err; then
2661     ac_cpp_err=$ac_c_preproc_warn_flag
2662   else
2663     ac_cpp_err=
2664   fi
2665 else
2666   ac_cpp_err=yes
2667 fi
2668 if test -z "$ac_cpp_err"; then
2669   # Broken: success on invalid input.
2670 continue
2671 else
2672   echo "$as_me: failed program was:" >&5
2673   cat "conftest.$ac_ext" >&5
2674   # Passes both tests.
2675 ac_preproc_ok=:
2676 break
2677 fi
2678 rm -f conftest.err "conftest.$ac_ext"
2679
2680 done
2681 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2682 rm -f conftest.err "conftest.$ac_ext"
2683 if $ac_preproc_ok; then
2684   :
2685 else
2686   { { echo "$as_me:2686: error: C preprocessor \"$CPP\" fails sanity check" >&5
2687 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2688    { (exit 1); exit 1; }; }
2689 fi
2690
2691 ac_ext=c
2692 ac_cpp='$CPP $CPPFLAGS'
2693 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2694 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2695 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2696 ac_main_return="return"
2697
2698 echo "$as_me:2698: checking whether ${MAKE-make} sets \${MAKE}" >&5
2699 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2700 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2701 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2702   echo $ECHO_N "(cached) $ECHO_C" >&6
2703 else
2704   cat >conftest.make <<\EOF
2705 all:
2706         @echo 'ac_maketemp="${MAKE}"'
2707 EOF
2708 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2709 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2710 if test -n "$ac_maketemp"; then
2711   eval ac_cv_prog_make_${ac_make}_set=yes
2712 else
2713   eval ac_cv_prog_make_${ac_make}_set=no
2714 fi
2715 rm -f conftest.make
2716 fi
2717 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2718   echo "$as_me:2718: result: yes" >&5
2719 echo "${ECHO_T}yes" >&6
2720   SET_MAKE=
2721 else
2722   echo "$as_me:2722: result: no" >&5
2723 echo "${ECHO_T}no" >&6
2724   SET_MAKE="MAKE=${MAKE-make}"
2725 fi
2726
2727 if test -n "$ac_tool_prefix"; then
2728   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2729 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2730 echo "$as_me:2730: checking for $ac_word" >&5
2731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732 if test "${ac_cv_prog_RANLIB+set}" = set; then
2733   echo $ECHO_N "(cached) $ECHO_C" >&6
2734 else
2735   if test -n "$RANLIB"; then
2736   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2737 else
2738   ac_save_IFS=$IFS; IFS=$ac_path_separator
2739 ac_dummy="$PATH"
2740 for ac_dir in $ac_dummy; do
2741   IFS=$ac_save_IFS
2742   test -z "$ac_dir" && ac_dir=.
2743   $as_executable_p "$ac_dir/$ac_word" || continue
2744 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2745 echo "$as_me:2745: found $ac_dir/$ac_word" >&5
2746 break
2747 done
2748
2749 fi
2750 fi
2751 RANLIB=$ac_cv_prog_RANLIB
2752 if test -n "$RANLIB"; then
2753   echo "$as_me:2753: result: $RANLIB" >&5
2754 echo "${ECHO_T}$RANLIB" >&6
2755 else
2756   echo "$as_me:2756: result: no" >&5
2757 echo "${ECHO_T}no" >&6
2758 fi
2759
2760 fi
2761 if test -z "$ac_cv_prog_RANLIB"; then
2762   ac_ct_RANLIB=$RANLIB
2763   # Extract the first word of "ranlib", so it can be a program name with args.
2764 set dummy ranlib; ac_word=$2
2765 echo "$as_me:2765: checking for $ac_word" >&5
2766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2767 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2768   echo $ECHO_N "(cached) $ECHO_C" >&6
2769 else
2770   if test -n "$ac_ct_RANLIB"; then
2771   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2772 else
2773   ac_save_IFS=$IFS; IFS=$ac_path_separator
2774 ac_dummy="$PATH"
2775 for ac_dir in $ac_dummy; do
2776   IFS=$ac_save_IFS
2777   test -z "$ac_dir" && ac_dir=.
2778   $as_executable_p "$ac_dir/$ac_word" || continue
2779 ac_cv_prog_ac_ct_RANLIB="ranlib"
2780 echo "$as_me:2780: found $ac_dir/$ac_word" >&5
2781 break
2782 done
2783
2784   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2785 fi
2786 fi
2787 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2788 if test -n "$ac_ct_RANLIB"; then
2789   echo "$as_me:2789: result: $ac_ct_RANLIB" >&5
2790 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2791 else
2792   echo "$as_me:2792: result: no" >&5
2793 echo "${ECHO_T}no" >&6
2794 fi
2795
2796   RANLIB=$ac_ct_RANLIB
2797 else
2798   RANLIB="$ac_cv_prog_RANLIB"
2799 fi
2800
2801 # Find a good install program.  We prefer a C program (faster),
2802 # so one script is as good as another.  But avoid the broken or
2803 # incompatible versions:
2804 # SysV /etc/install, /usr/sbin/install
2805 # SunOS /usr/etc/install
2806 # IRIX /sbin/install
2807 # AIX /bin/install
2808 # AmigaOS /C/install, which installs bootblocks on floppy discs
2809 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2810 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2811 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2812 # ./install, which can be erroneously created by make from ./install.sh.
2813 echo "$as_me:2813: checking for a BSD compatible install" >&5
2814 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2815 if test -z "$INSTALL"; then
2816 if test "${ac_cv_path_install+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819     ac_save_IFS=$IFS; IFS=$ac_path_separator
2820   for ac_dir in $PATH; do
2821     IFS=$ac_save_IFS
2822     # Account for people who put trailing slashes in PATH elements.
2823     case $ac_dir/ in
2824     / | ./ | .// | /cC/* \
2825     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2826     | /usr/ucb/* ) ;;
2827     *)
2828       # OSF1 and SCO ODT 3.0 have their own names for install.
2829       # Don't use installbsd from OSF since it installs stuff as root
2830       # by default.
2831       for ac_prog in ginstall scoinst install; do
2832         if $as_executable_p "$ac_dir/$ac_prog"; then
2833           if test $ac_prog = install &&
2834             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2835             # AIX install.  It has an incompatible calling convention.
2836             :
2837           elif test $ac_prog = install &&
2838             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2839             # program-specific install script used by HP pwplus--don't use.
2840             :
2841           else
2842             ac_cv_path_install="$ac_dir/$ac_prog -c"
2843             break 2
2844           fi
2845         fi
2846       done
2847       ;;
2848     esac
2849   done
2850
2851 fi
2852   if test "${ac_cv_path_install+set}" = set; then
2853     INSTALL=$ac_cv_path_install
2854   else
2855     # As a last resort, use the slow shell script.  We don't cache a
2856     # path for INSTALL within a source directory, because that will
2857     # break other packages using the cache if that directory is
2858     # removed, or if the path is relative.
2859     INSTALL=$ac_install_sh
2860   fi
2861 fi
2862 echo "$as_me:2862: result: $INSTALL" >&5
2863 echo "${ECHO_T}$INSTALL" >&6
2864
2865 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2866 # It thinks the first close brace ends the variable substitution.
2867 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2868
2869 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2870
2871 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2872
2873 echo "$as_me:2873: checking whether ln -s works" >&5
2874 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2875 LN_S=$as_ln_s
2876 if test "$LN_S" = "ln -s"; then
2877   echo "$as_me:2877: result: yes" >&5
2878 echo "${ECHO_T}yes" >&6
2879 else
2880   echo "$as_me:2880: result: no, using $LN_S" >&5
2881 echo "${ECHO_T}no, using $LN_S" >&6
2882 fi
2883
2884 echo "$as_me:2884: checking if $LN_S -f options work" >&5
2885 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2886
2887 rm -f conf$$.src conf$$dst
2888 echo >conf$$.dst
2889 echo first >conf$$.src
2890 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2891         cf_prog_ln_sf=yes
2892 else
2893         cf_prog_ln_sf=no
2894 fi
2895 rm -f conf$$.dst conf$$src
2896 echo "$as_me:2896: result: $cf_prog_ln_sf" >&5
2897 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2898
2899 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2900
2901 for ac_prog in lint cppcheck splint
2902 do
2903   # Extract the first word of "$ac_prog", so it can be a program name with args.
2904 set dummy $ac_prog; ac_word=$2
2905 echo "$as_me:2905: checking for $ac_word" >&5
2906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2907 if test "${ac_cv_prog_LINT+set}" = set; then
2908   echo $ECHO_N "(cached) $ECHO_C" >&6
2909 else
2910   if test -n "$LINT"; then
2911   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2912 else
2913   ac_save_IFS=$IFS; IFS=$ac_path_separator
2914 ac_dummy="$PATH"
2915 for ac_dir in $ac_dummy; do
2916   IFS=$ac_save_IFS
2917   test -z "$ac_dir" && ac_dir=.
2918   $as_executable_p "$ac_dir/$ac_word" || continue
2919 ac_cv_prog_LINT="$ac_prog"
2920 echo "$as_me:2920: found $ac_dir/$ac_word" >&5
2921 break
2922 done
2923
2924 fi
2925 fi
2926 LINT=$ac_cv_prog_LINT
2927 if test -n "$LINT"; then
2928   echo "$as_me:2928: result: $LINT" >&5
2929 echo "${ECHO_T}$LINT" >&6
2930 else
2931   echo "$as_me:2931: result: no" >&5
2932 echo "${ECHO_T}no" >&6
2933 fi
2934
2935   test -n "$LINT" && break
2936 done
2937
2938 case "x$LINT" in
2939 (xcppcheck|x*/cppcheck)
2940         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2941         ;;
2942 esac
2943
2944 # Extract the first word of "groff", so it can be a program name with args.
2945 set dummy groff; ac_word=$2
2946 echo "$as_me:2946: checking for $ac_word" >&5
2947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2948 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
2949   echo $ECHO_N "(cached) $ECHO_C" >&6
2950 else
2951   case $GROFF_PATH in
2952   [\\/]* | ?:[\\/]*)
2953   ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
2954   ;;
2955   *)
2956   ac_save_IFS=$IFS; IFS=$ac_path_separator
2957 ac_dummy="$PATH"
2958 for ac_dir in $ac_dummy; do
2959   IFS=$ac_save_IFS
2960   test -z "$ac_dir" && ac_dir=.
2961   if $as_executable_p "$ac_dir/$ac_word"; then
2962    ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
2963    echo "$as_me:2963: found $ac_dir/$ac_word" >&5
2964    break
2965 fi
2966 done
2967
2968   test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
2969   ;;
2970 esac
2971 fi
2972 GROFF_PATH=$ac_cv_path_GROFF_PATH
2973
2974 if test -n "$GROFF_PATH"; then
2975   echo "$as_me:2975: result: $GROFF_PATH" >&5
2976 echo "${ECHO_T}$GROFF_PATH" >&6
2977 else
2978   echo "$as_me:2978: result: no" >&5
2979 echo "${ECHO_T}no" >&6
2980 fi
2981
2982 for ac_prog in nroff mandoc
2983 do
2984   # Extract the first word of "$ac_prog", so it can be a program name with args.
2985 set dummy $ac_prog; ac_word=$2
2986 echo "$as_me:2986: checking for $ac_word" >&5
2987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2988 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
2989   echo $ECHO_N "(cached) $ECHO_C" >&6
2990 else
2991   case $NROFF_PATH in
2992   [\\/]* | ?:[\\/]*)
2993   ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
2994   ;;
2995   *)
2996   ac_save_IFS=$IFS; IFS=$ac_path_separator
2997 ac_dummy="$PATH"
2998 for ac_dir in $ac_dummy; do
2999   IFS=$ac_save_IFS
3000   test -z "$ac_dir" && ac_dir=.
3001   if $as_executable_p "$ac_dir/$ac_word"; then
3002    ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
3003    echo "$as_me:3003: found $ac_dir/$ac_word" >&5
3004    break
3005 fi
3006 done
3007
3008   ;;
3009 esac
3010 fi
3011 NROFF_PATH=$ac_cv_path_NROFF_PATH
3012
3013 if test -n "$NROFF_PATH"; then
3014   echo "$as_me:3014: result: $NROFF_PATH" >&5
3015 echo "${ECHO_T}$NROFF_PATH" >&6
3016 else
3017   echo "$as_me:3017: result: no" >&5
3018 echo "${ECHO_T}no" >&6
3019 fi
3020
3021   test -n "$NROFF_PATH" && break
3022 done
3023 test -n "$NROFF_PATH" || NROFF_PATH="no"
3024
3025 # Extract the first word of "tbl", so it can be a program name with args.
3026 set dummy tbl; ac_word=$2
3027 echo "$as_me:3027: checking for $ac_word" >&5
3028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029 if test "${ac_cv_path_TBL_PATH+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032   case $TBL_PATH in
3033   [\\/]* | ?:[\\/]*)
3034   ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
3035   ;;
3036   *)
3037   ac_save_IFS=$IFS; IFS=$ac_path_separator
3038 ac_dummy="$PATH"
3039 for ac_dir in $ac_dummy; do
3040   IFS=$ac_save_IFS
3041   test -z "$ac_dir" && ac_dir=.
3042   if $as_executable_p "$ac_dir/$ac_word"; then
3043    ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
3044    echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045    break
3046 fi
3047 done
3048
3049   test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
3050   ;;
3051 esac
3052 fi
3053 TBL_PATH=$ac_cv_path_TBL_PATH
3054
3055 if test -n "$TBL_PATH"; then
3056   echo "$as_me:3056: result: $TBL_PATH" >&5
3057 echo "${ECHO_T}$TBL_PATH" >&6
3058 else
3059   echo "$as_me:3059: result: no" >&5
3060 echo "${ECHO_T}no" >&6
3061 fi
3062
3063 if test "x$GROFF_PATH" = xno
3064 then
3065         NROFF_NOTE=
3066         GROFF_NOTE="#"
3067 else
3068         NROFF_NOTE="#"
3069         GROFF_NOTE=
3070 fi
3071
3072 test -z "$GROFF_NOTE" && NROFF_NOTE=
3073
3074 if test -n "$ac_tool_prefix"; then
3075   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3076 set dummy ${ac_tool_prefix}ar; ac_word=$2
3077 echo "$as_me:3077: checking for $ac_word" >&5
3078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079 if test "${ac_cv_prog_AR+set}" = set; then
3080   echo $ECHO_N "(cached) $ECHO_C" >&6
3081 else
3082   if test -n "$AR"; then
3083   ac_cv_prog_AR="$AR" # Let the user override the test.
3084 else
3085   ac_save_IFS=$IFS; IFS=$ac_path_separator
3086 ac_dummy="$PATH"
3087 for ac_dir in $ac_dummy; do
3088   IFS=$ac_save_IFS
3089   test -z "$ac_dir" && ac_dir=.
3090   $as_executable_p "$ac_dir/$ac_word" || continue
3091 ac_cv_prog_AR="${ac_tool_prefix}ar"
3092 echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3093 break
3094 done
3095
3096 fi
3097 fi
3098 AR=$ac_cv_prog_AR
3099 if test -n "$AR"; then
3100   echo "$as_me:3100: result: $AR" >&5
3101 echo "${ECHO_T}$AR" >&6
3102 else
3103   echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3105 fi
3106
3107 fi
3108 if test -z "$ac_cv_prog_AR"; then
3109   ac_ct_AR=$AR
3110   # Extract the first word of "ar", so it can be a program name with args.
3111 set dummy ar; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3115   echo $ECHO_N "(cached) $ECHO_C" >&6
3116 else
3117   if test -n "$ac_ct_AR"; then
3118   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3119 else
3120   ac_save_IFS=$IFS; IFS=$ac_path_separator
3121 ac_dummy="$PATH"
3122 for ac_dir in $ac_dummy; do
3123   IFS=$ac_save_IFS
3124   test -z "$ac_dir" && ac_dir=.
3125   $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_ac_ct_AR="ar"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128 break
3129 done
3130
3131   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3132 fi
3133 fi
3134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3135 if test -n "$ac_ct_AR"; then
3136   echo "$as_me:3136: result: $ac_ct_AR" >&5
3137 echo "${ECHO_T}$ac_ct_AR" >&6
3138 else
3139   echo "$as_me:3139: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142
3143   AR=$ac_ct_AR
3144 else
3145   AR="$ac_cv_prog_AR"
3146 fi
3147
3148 echo "$as_me:3148: checking for options to update archives" >&5
3149 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3150 if test "${cf_cv_ar_flags+set}" = set; then
3151   echo $ECHO_N "(cached) $ECHO_C" >&6
3152 else
3153
3154         case "$cf_cv_system_name" in
3155         (*-msvc*)
3156                 cf_cv_ar_flags=''
3157                 cat >mk_static_lib.sh <<-EOF
3158                 #!$SHELL
3159                 MSVC_BIN="$AR"
3160                 out="\$1"
3161                 shift
3162                 exec \$MSVC_BIN -out:"\$out" \$@
3163                 EOF
3164                 chmod +x mk_static_lib.sh
3165                 AR=`pwd`/mk_static_lib.sh
3166                 ;;
3167         (*)
3168                 cf_cv_ar_flags=unknown
3169                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3170                 do
3171
3172                         # check if $ARFLAGS already contains this choice
3173                         if test "x$ARFLAGS" != "x" ; then
3174                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3175                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3176                                         cf_cv_ar_flags=
3177                                         break
3178                                 fi
3179                         fi
3180
3181                         rm -f "conftest.$ac_cv_objext"
3182                         rm -f conftest.a
3183
3184                         cat >"conftest.$ac_ext" <<EOF
3185 #line 3185 "configure"
3186 int     testdata[3] = { 123, 456, 789 };
3187 EOF
3188                         if { (eval echo "$as_me:3188: \"$ac_compile\"") >&5
3189   (eval $ac_compile) 2>&5
3190   ac_status=$?
3191   echo "$as_me:3191: \$? = $ac_status" >&5
3192   (exit "$ac_status"); } ; then
3193                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3194                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
3195                                 if test -f conftest.a ; then
3196                                         cf_cv_ar_flags="$cf_ar_flags"
3197                                         break
3198                                 fi
3199                         else
3200                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3201
3202 echo "${as_me:-configure}:3202: testing cannot compile test-program ..." 1>&5
3203
3204                                 break
3205                         fi
3206                 done
3207                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
3208                 ;;
3209         esac
3210
3211 fi
3212 echo "$as_me:3212: result: $cf_cv_ar_flags" >&5
3213 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3214
3215 if test -n "$ARFLAGS" ; then
3216         if test -n "$cf_cv_ar_flags" ; then
3217                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3218         fi
3219 else
3220         ARFLAGS=$cf_cv_ar_flags
3221 fi
3222
3223 echo "$as_me:3223: checking for fgrep" >&5
3224 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3225 if test "${ac_cv_path_FGREP+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3229    then ac_cv_path_FGREP="$GREP -F"
3230    else
3231      for ac_prog in gfgrep fgrep
3232 do
3233   # Extract the first word of "$ac_prog", so it can be a program name with args.
3234 set dummy $ac_prog; ac_word=$2
3235 echo "$as_me:3235: checking for $ac_word" >&5
3236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3237 if test "${ac_cv_path_FGREP+set}" = set; then
3238   echo $ECHO_N "(cached) $ECHO_C" >&6
3239 else
3240   case $FGREP in
3241   [\\/]* | ?:[\\/]*)
3242   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3243   ;;
3244   *)
3245   ac_save_IFS=$IFS; IFS=$ac_path_separator
3246 ac_dummy="$PATH"
3247 for ac_dir in $ac_dummy; do
3248   IFS=$ac_save_IFS
3249   test -z "$ac_dir" && ac_dir=.
3250   if $as_executable_p "$ac_dir/$ac_word"; then
3251    ac_cv_path_FGREP="$ac_dir/$ac_word"
3252    echo "$as_me:3252: found $ac_dir/$ac_word" >&5
3253    break
3254 fi
3255 done
3256
3257   ;;
3258 esac
3259 fi
3260 FGREP=$ac_cv_path_FGREP
3261
3262 if test -n "$FGREP"; then
3263   echo "$as_me:3263: result: $FGREP" >&5
3264 echo "${ECHO_T}$FGREP" >&6
3265 else
3266   echo "$as_me:3266: result: no" >&5
3267 echo "${ECHO_T}no" >&6
3268 fi
3269
3270   test -n "$FGREP" && break
3271 done
3272 test -n "$FGREP" || FGREP=": "
3273
3274      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3274: error: cannot find workable fgrep" >&5
3275 echo "$as_me: error: cannot find workable fgrep" >&2;}
3276    { (exit 1); exit 1; }; }
3277    fi
3278 fi
3279 echo "$as_me:3279: result: $ac_cv_path_FGREP" >&5
3280 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3281  FGREP="$ac_cv_path_FGREP"
3282
3283 echo "$as_me:3283: checking for makeflags variable" >&5
3284 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3285 if test "${cf_cv_makeflags+set}" = set; then
3286   echo $ECHO_N "(cached) $ECHO_C" >&6
3287 else
3288
3289         cf_cv_makeflags=''
3290         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3291         do
3292                 cat >cf_makeflags.tmp <<CF_EOF
3293 SHELL = $SHELL
3294 all :
3295         @ echo '.$cf_option'
3296 CF_EOF
3297                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
3298                 case "$cf_result" in
3299                 (.*k|.*kw)
3300                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3301                         case "$cf_result" in
3302                         (.*CC=*)        cf_cv_makeflags=
3303                                 ;;
3304                         (*)     cf_cv_makeflags=$cf_option
3305                                 ;;
3306                         esac
3307                         break
3308                         ;;
3309                 (.-)
3310                         ;;
3311                 (*)
3312
3313 echo "${as_me:-configure}:3313: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3314
3315                         ;;
3316                 esac
3317         done
3318         rm -f cf_makeflags.tmp
3319
3320 fi
3321 echo "$as_me:3321: result: $cf_cv_makeflags" >&5
3322 echo "${ECHO_T}$cf_cv_makeflags" >&6
3323
3324 echo "$as_me:3324: checking if filesystem supports mixed-case filenames" >&5
3325 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3326 if test "${cf_cv_mixedcase+set}" = set; then
3327   echo $ECHO_N "(cached) $ECHO_C" >&6
3328 else
3329
3330 if test "$cross_compiling" = yes ; then
3331         case "$target_alias" in
3332         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3333                 cf_cv_mixedcase=no
3334                 ;;
3335         (*)
3336                 cf_cv_mixedcase=yes
3337                 ;;
3338         esac
3339 else
3340         rm -f conftest CONFTEST
3341         echo test >conftest
3342         if test -f CONFTEST ; then
3343                 cf_cv_mixedcase=no
3344         else
3345                 cf_cv_mixedcase=yes
3346         fi
3347         rm -f conftest CONFTEST
3348 fi
3349
3350 fi
3351 echo "$as_me:3351: result: $cf_cv_mixedcase" >&5
3352 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3353 test "$cf_cv_mixedcase" = yes &&
3354 cat >>confdefs.h <<\EOF
3355 #define MIXEDCASE_FILENAMES 1
3356 EOF
3357
3358 for ac_prog in exctags ctags
3359 do
3360   # Extract the first word of "$ac_prog", so it can be a program name with args.
3361 set dummy $ac_prog; ac_word=$2
3362 echo "$as_me:3362: checking for $ac_word" >&5
3363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3364 if test "${ac_cv_prog_CTAGS+set}" = set; then
3365   echo $ECHO_N "(cached) $ECHO_C" >&6
3366 else
3367   if test -n "$CTAGS"; then
3368   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3369 else
3370   ac_save_IFS=$IFS; IFS=$ac_path_separator
3371 ac_dummy="$PATH"
3372 for ac_dir in $ac_dummy; do
3373   IFS=$ac_save_IFS
3374   test -z "$ac_dir" && ac_dir=.
3375   $as_executable_p "$ac_dir/$ac_word" || continue
3376 ac_cv_prog_CTAGS="$ac_prog"
3377 echo "$as_me:3377: found $ac_dir/$ac_word" >&5
3378 break
3379 done
3380
3381 fi
3382 fi
3383 CTAGS=$ac_cv_prog_CTAGS
3384 if test -n "$CTAGS"; then
3385   echo "$as_me:3385: result: $CTAGS" >&5
3386 echo "${ECHO_T}$CTAGS" >&6
3387 else
3388   echo "$as_me:3388: result: no" >&5
3389 echo "${ECHO_T}no" >&6
3390 fi
3391
3392   test -n "$CTAGS" && break
3393 done
3394
3395 for ac_prog in exetags etags
3396 do
3397   # Extract the first word of "$ac_prog", so it can be a program name with args.
3398 set dummy $ac_prog; ac_word=$2
3399 echo "$as_me:3399: checking for $ac_word" >&5
3400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3401 if test "${ac_cv_prog_ETAGS+set}" = set; then
3402   echo $ECHO_N "(cached) $ECHO_C" >&6
3403 else
3404   if test -n "$ETAGS"; then
3405   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3406 else
3407   ac_save_IFS=$IFS; IFS=$ac_path_separator
3408 ac_dummy="$PATH"
3409 for ac_dir in $ac_dummy; do
3410   IFS=$ac_save_IFS
3411   test -z "$ac_dir" && ac_dir=.
3412   $as_executable_p "$ac_dir/$ac_word" || continue
3413 ac_cv_prog_ETAGS="$ac_prog"
3414 echo "$as_me:3414: found $ac_dir/$ac_word" >&5
3415 break
3416 done
3417
3418 fi
3419 fi
3420 ETAGS=$ac_cv_prog_ETAGS
3421 if test -n "$ETAGS"; then
3422   echo "$as_me:3422: result: $ETAGS" >&5
3423 echo "${ECHO_T}$ETAGS" >&6
3424 else
3425   echo "$as_me:3425: result: no" >&5
3426 echo "${ECHO_T}no" >&6
3427 fi
3428
3429   test -n "$ETAGS" && break
3430 done
3431
3432 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3433 set dummy ${CTAGS:-ctags}; ac_word=$2
3434 echo "$as_me:3434: checking for $ac_word" >&5
3435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3437   echo $ECHO_N "(cached) $ECHO_C" >&6
3438 else
3439   if test -n "$MAKE_LOWER_TAGS"; then
3440   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3441 else
3442   ac_save_IFS=$IFS; IFS=$ac_path_separator
3443 ac_dummy="$PATH"
3444 for ac_dir in $ac_dummy; do
3445   IFS=$ac_save_IFS
3446   test -z "$ac_dir" && ac_dir=.
3447   $as_executable_p "$ac_dir/$ac_word" || continue
3448 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3449 echo "$as_me:3449: found $ac_dir/$ac_word" >&5
3450 break
3451 done
3452
3453   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3454 fi
3455 fi
3456 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3457 if test -n "$MAKE_LOWER_TAGS"; then
3458   echo "$as_me:3458: result: $MAKE_LOWER_TAGS" >&5
3459 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3460 else
3461   echo "$as_me:3461: result: no" >&5
3462 echo "${ECHO_T}no" >&6
3463 fi
3464
3465 if test "$cf_cv_mixedcase" = yes ; then
3466         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3467 set dummy ${ETAGS:-etags}; ac_word=$2
3468 echo "$as_me:3468: checking for $ac_word" >&5
3469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3470 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3471   echo $ECHO_N "(cached) $ECHO_C" >&6
3472 else
3473   if test -n "$MAKE_UPPER_TAGS"; then
3474   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3475 else
3476   ac_save_IFS=$IFS; IFS=$ac_path_separator
3477 ac_dummy="$PATH"
3478 for ac_dir in $ac_dummy; do
3479   IFS=$ac_save_IFS
3480   test -z "$ac_dir" && ac_dir=.
3481   $as_executable_p "$ac_dir/$ac_word" || continue
3482 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3483 echo "$as_me:3483: found $ac_dir/$ac_word" >&5
3484 break
3485 done
3486
3487   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3488 fi
3489 fi
3490 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3491 if test -n "$MAKE_UPPER_TAGS"; then
3492   echo "$as_me:3492: result: $MAKE_UPPER_TAGS" >&5
3493 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3494 else
3495   echo "$as_me:3495: result: no" >&5
3496 echo "${ECHO_T}no" >&6
3497 fi
3498
3499 else
3500         MAKE_UPPER_TAGS=no
3501 fi
3502
3503 if test "$MAKE_UPPER_TAGS" = yes ; then
3504         MAKE_UPPER_TAGS=
3505 else
3506         MAKE_UPPER_TAGS="#"
3507 fi
3508
3509 if test "$MAKE_LOWER_TAGS" = yes ; then
3510         MAKE_LOWER_TAGS=
3511 else
3512         MAKE_LOWER_TAGS="#"
3513 fi
3514
3515 echo "$as_me:3515: checking if you want to see long compiling messages" >&5
3516 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3517
3518 # Check whether --enable-echo or --disable-echo was given.
3519 if test "${enable_echo+set}" = set; then
3520   enableval="$enable_echo"
3521   test "$enableval" != no && enableval=yes
3522         if test "$enableval" != "yes" ; then
3523
3524         ECHO_LT='--silent'
3525         ECHO_LD='@echo linking $@;'
3526         RULE_CC='@echo compiling $<'
3527         SHOW_CC='@echo compiling $@'
3528         ECHO_CC='@'
3529
3530         else
3531
3532         ECHO_LT=''
3533         ECHO_LD=''
3534         RULE_CC=''
3535         SHOW_CC=''
3536         ECHO_CC=''
3537
3538         fi
3539 else
3540   enableval=yes
3541
3542         ECHO_LT=''
3543         ECHO_LD=''
3544         RULE_CC=''
3545         SHOW_CC=''
3546         ECHO_CC=''
3547
3548 fi;
3549 echo "$as_me:3549: result: $enableval" >&5
3550 echo "${ECHO_T}$enableval" >&6
3551
3552 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
3553
3554         system_name="$host_os"
3555 else
3556         system_name="`(uname -s -r) 2>/dev/null`"
3557         if test -z "$system_name" ; then
3558                 system_name="`(hostname) 2>/dev/null`"
3559         fi
3560 fi
3561 test -n "$system_name" &&
3562 cat >>confdefs.h <<EOF
3563 #define SYSTEM_NAME "$system_name"
3564 EOF
3565
3566 if test "${cf_cv_system_name+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569   cf_cv_system_name="$system_name"
3570 fi
3571
3572 test -z "$system_name" && system_name="$cf_cv_system_name"
3573 test -n "$cf_cv_system_name" && echo "$as_me:3573: result: Configuring for $cf_cv_system_name" >&5
3574 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
3575
3576 if test ".$system_name" != ".$cf_cv_system_name" ; then
3577         echo "$as_me:3577: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
3578 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
3579         { { echo "$as_me:3579: error: \"Please remove config.cache and try again.\"" >&5
3580 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
3581    { (exit 1); exit 1; }; }
3582 fi
3583
3584 case "$cf_cv_system_name" in
3585 (os2*)
3586         CFLAGS="$CFLAGS -Zmt"
3587
3588         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3589         CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
3590
3591         CXXFLAGS="$CXXFLAGS -Zmt"
3592         # autoconf's macro sets -Zexe and suffix both, which conflict:w
3593         LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3594         ac_cv_exeext=.exe
3595         ;;
3596 esac
3597
3598 PROG_EXT="$EXEEXT"
3599
3600 test -n "$PROG_EXT" &&
3601 cat >>confdefs.h <<EOF
3602 #define PROG_EXT "$PROG_EXT"
3603 EOF
3604
3605         echo "$as_me:3605: checking for PATH separator" >&5
3606 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3607         case "$cf_cv_system_name" in
3608         (os2*)  PATH_SEPARATOR=';'  ;;
3609         (*)     ${PATH_SEPARATOR:=':'}  ;;
3610         esac
3611
3612         echo "$as_me:3612: result: $PATH_SEPARATOR" >&5
3613 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3614
3615         case "$cf_cv_system_name" in
3616         (OS/2*|os2*)
3617                 if test "$DFT_LWR_MODEL" = libtool; then
3618                         LIB_PREFIX='lib'
3619                 else
3620                         LIB_PREFIX=''
3621                 fi
3622                 ;;
3623         (*-msvc*)
3624                 LIB_PREFIX=''
3625                 ;;
3626         (*)     LIB_PREFIX='lib'
3627                 ;;
3628         esac
3629
3630 echo "$as_me:3630: checking if the POSIX test-macros are already defined" >&5
3631 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3632 if test "${cf_cv_posix_visible+set}" = set; then
3633   echo $ECHO_N "(cached) $ECHO_C" >&6
3634 else
3635
3636 cat >"conftest.$ac_ext" <<_ACEOF
3637 #line 3637 "configure"
3638 #include "confdefs.h"
3639 #include <stdio.h>
3640 int
3641 main (void)
3642 {
3643
3644 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3645         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3646         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3647         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3648 #error conflicting symbols found
3649 #endif
3650
3651   ;
3652   return 0;
3653 }
3654 _ACEOF
3655 rm -f "conftest.$ac_objext"
3656 if { (eval echo "$as_me:3656: \"$ac_compile\"") >&5
3657   (eval $ac_compile) 2>&5
3658   ac_status=$?
3659   echo "$as_me:3659: \$? = $ac_status" >&5
3660   (exit "$ac_status"); } &&
3661          { ac_try='test -s "conftest.$ac_objext"'
3662   { (eval echo "$as_me:3662: \"$ac_try\"") >&5
3663   (eval $ac_try) 2>&5
3664   ac_status=$?
3665   echo "$as_me:3665: \$? = $ac_status" >&5
3666   (exit "$ac_status"); }; }; then
3667   cf_cv_posix_visible=no
3668 else
3669   echo "$as_me: failed program was:" >&5
3670 cat "conftest.$ac_ext" >&5
3671 cf_cv_posix_visible=yes
3672 fi
3673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3674
3675 fi
3676 echo "$as_me:3676: result: $cf_cv_posix_visible" >&5
3677 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3678
3679 if test "$cf_cv_posix_visible" = no; then
3680
3681 cf_XOPEN_SOURCE=500
3682 cf_POSIX_C_SOURCE=199506L
3683 cf_xopen_source=
3684
3685 case "$host_os" in
3686 (aix[4-7]*)
3687         cf_xopen_source="-D_ALL_SOURCE"
3688         ;;
3689 (msys)
3690         cf_XOPEN_SOURCE=600
3691         ;;
3692 (darwin[0-8].*)
3693         cf_xopen_source="-D_APPLE_C_SOURCE"
3694         ;;
3695 (darwin*)
3696         cf_xopen_source="-D_DARWIN_C_SOURCE"
3697         cf_XOPEN_SOURCE=
3698         ;;
3699 (freebsd*|dragonfly*|midnightbsd*)
3700         # 5.x headers associate
3701         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3702         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3703         cf_POSIX_C_SOURCE=200112L
3704         cf_XOPEN_SOURCE=600
3705         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3706         ;;
3707 (hpux11*)
3708         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3709         ;;
3710 (hpux*)
3711         cf_xopen_source="-D_HPUX_SOURCE"
3712         ;;
3713 (irix[56].*)
3714         cf_xopen_source="-D_SGI_SOURCE"
3715         cf_XOPEN_SOURCE=
3716         ;;
3717 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3718
3719 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3720
3721 echo "$as_me:3721: checking if this is the GNU C library" >&5
3722 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3723 if test "${cf_cv_gnu_library+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726
3727 cat >"conftest.$ac_ext" <<_ACEOF
3728 #line 3728 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 int
3732 main (void)
3733 {
3734
3735         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3736                 return 0;
3737         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3738                 return 0;
3739         #else
3740         #       error not GNU C library
3741         #endif
3742   ;
3743   return 0;
3744 }
3745 _ACEOF
3746 rm -f "conftest.$ac_objext"
3747 if { (eval echo "$as_me:3747: \"$ac_compile\"") >&5
3748   (eval $ac_compile) 2>&5
3749   ac_status=$?
3750   echo "$as_me:3750: \$? = $ac_status" >&5
3751   (exit "$ac_status"); } &&
3752          { ac_try='test -s "conftest.$ac_objext"'
3753   { (eval echo "$as_me:3753: \"$ac_try\"") >&5
3754   (eval $ac_try) 2>&5
3755   ac_status=$?
3756   echo "$as_me:3756: \$? = $ac_status" >&5
3757   (exit "$ac_status"); }; }; then
3758   cf_cv_gnu_library=yes
3759 else
3760   echo "$as_me: failed program was:" >&5
3761 cat "conftest.$ac_ext" >&5
3762 cf_cv_gnu_library=no
3763 fi
3764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3765
3766 fi
3767 echo "$as_me:3767: result: $cf_cv_gnu_library" >&5
3768 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3769
3770 if test x$cf_cv_gnu_library = xyes; then
3771
3772         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3773         # was changed to help a little.  newlib incorporated the change about 4
3774         # years later.
3775         echo "$as_me:3775: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3776 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3777 if test "${cf_cv_gnu_library_219+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780
3781                 cf_save="$CPPFLAGS"
3782
3783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3784         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3785
3786                 cat >"conftest.$ac_ext" <<_ACEOF
3787 #line 3787 "configure"
3788 #include "confdefs.h"
3789 #include <sys/types.h>
3790 int
3791 main (void)
3792 {
3793
3794                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3795                                 return 0;
3796                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3797                                 return 0;
3798                         #else
3799                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3800                         #endif
3801   ;
3802   return 0;
3803 }
3804 _ACEOF
3805 rm -f "conftest.$ac_objext"
3806 if { (eval echo "$as_me:3806: \"$ac_compile\"") >&5
3807   (eval $ac_compile) 2>&5
3808   ac_status=$?
3809   echo "$as_me:3809: \$? = $ac_status" >&5
3810   (exit "$ac_status"); } &&
3811          { ac_try='test -s "conftest.$ac_objext"'
3812   { (eval echo "$as_me:3812: \"$ac_try\"") >&5
3813   (eval $ac_try) 2>&5
3814   ac_status=$?
3815   echo "$as_me:3815: \$? = $ac_status" >&5
3816   (exit "$ac_status"); }; }; then
3817   cf_cv_gnu_library_219=yes
3818 else
3819   echo "$as_me: failed program was:" >&5
3820 cat "conftest.$ac_ext" >&5
3821 cf_cv_gnu_library_219=no
3822 fi
3823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3824                 CPPFLAGS="$cf_save"
3825
3826 fi
3827 echo "$as_me:3827: result: $cf_cv_gnu_library_219" >&5
3828 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3829
3830         if test "x$cf_cv_gnu_library_219" = xyes; then
3831                 cf_save="$CPPFLAGS"
3832                 echo "$as_me:3832: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3833 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3834 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3835   echo $ECHO_N "(cached) $ECHO_C" >&6
3836 else
3837
3838 cf_fix_cppflags=no
3839 cf_new_cflags=
3840 cf_new_cppflags=
3841 cf_new_extra_cppflags=
3842
3843 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3844 do
3845 case "$cf_fix_cppflags" in
3846 (no)
3847         case "$cf_add_cflags" in
3848         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3849                 case "$cf_add_cflags" in
3850                 (-D*)
3851                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3852
3853                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3854                                 && test -z "${cf_tst_cflags}" \
3855                                 && cf_fix_cppflags=yes
3856
3857                         if test "$cf_fix_cppflags" = yes ; then
3858
3859         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3860         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3861
3862                                 continue
3863                         elif test "${cf_tst_cflags}" = "\"'" ; then
3864
3865         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3866         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3867
3868                                 continue
3869                         fi
3870                         ;;
3871                 esac
3872                 case "$CPPFLAGS" in
3873                 (*$cf_add_cflags)
3874                         ;;
3875                 (*)
3876                         case "$cf_add_cflags" in
3877                         (-D*)
3878                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3879
3880 CPPFLAGS=`echo "$CPPFLAGS" | \
3881         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3882                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3883
3884                                 ;;
3885                         esac
3886
3887         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3888         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3889
3890                         ;;
3891                 esac
3892                 ;;
3893         (*)
3894
3895         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3896         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3897
3898                 ;;
3899         esac
3900         ;;
3901 (yes)
3902
3903         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3904         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3905
3906         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3907
3908         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3909                 && test -z "${cf_tst_cflags}" \
3910                 && cf_fix_cppflags=no
3911         ;;
3912 esac
3913 done
3914
3915 if test -n "$cf_new_cflags" ; then
3916
3917         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3918         CFLAGS="${CFLAGS}$cf_new_cflags"
3919
3920 fi
3921
3922 if test -n "$cf_new_cppflags" ; then
3923
3924         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3925         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3926
3927 fi
3928
3929 if test -n "$cf_new_extra_cppflags" ; then
3930
3931         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3932         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3933
3934 fi
3935
3936                         cat >"conftest.$ac_ext" <<_ACEOF
3937 #line 3937 "configure"
3938 #include "confdefs.h"
3939
3940                                 #include <limits.h>
3941                                 #include <sys/types.h>
3942
3943 int
3944 main (void)
3945 {
3946
3947                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3948                                         return 0;
3949                                 #else
3950                                 #       error GNU C library is too old
3951                                 #endif
3952   ;
3953   return 0;
3954 }
3955 _ACEOF
3956 rm -f "conftest.$ac_objext"
3957 if { (eval echo "$as_me:3957: \"$ac_compile\"") >&5
3958   (eval $ac_compile) 2>&5
3959   ac_status=$?
3960   echo "$as_me:3960: \$? = $ac_status" >&5
3961   (exit "$ac_status"); } &&
3962          { ac_try='test -s "conftest.$ac_objext"'
3963   { (eval echo "$as_me:3963: \"$ac_try\"") >&5
3964   (eval $ac_try) 2>&5
3965   ac_status=$?
3966   echo "$as_me:3966: \$? = $ac_status" >&5
3967   (exit "$ac_status"); }; }; then
3968   cf_cv_gnu_dftsrc_219=yes
3969 else
3970   echo "$as_me: failed program was:" >&5
3971 cat "conftest.$ac_ext" >&5
3972 cf_cv_gnu_dftsrc_219=no
3973 fi
3974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3975
3976 fi
3977 echo "$as_me:3977: result: $cf_cv_gnu_dftsrc_219" >&5
3978 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3979                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3980         else
3981                 cf_cv_gnu_dftsrc_219=maybe
3982         fi
3983
3984         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3985
3986                 echo "$as_me:3986: checking if we must define _GNU_SOURCE" >&5
3987 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3988 if test "${cf_cv_gnu_source+set}" = set; then
3989   echo $ECHO_N "(cached) $ECHO_C" >&6
3990 else
3991
3992                 cat >"conftest.$ac_ext" <<_ACEOF
3993 #line 3993 "configure"
3994 #include "confdefs.h"
3995 #include <sys/types.h>
3996 int
3997 main (void)
3998 {
3999
4000                         #ifndef _XOPEN_SOURCE
4001                         #error  expected _XOPEN_SOURCE to be defined
4002                         #endif
4003   ;
4004   return 0;
4005 }
4006 _ACEOF
4007 rm -f "conftest.$ac_objext"
4008 if { (eval echo "$as_me:4008: \"$ac_compile\"") >&5
4009   (eval $ac_compile) 2>&5
4010   ac_status=$?
4011   echo "$as_me:4011: \$? = $ac_status" >&5
4012   (exit "$ac_status"); } &&
4013          { ac_try='test -s "conftest.$ac_objext"'
4014   { (eval echo "$as_me:4014: \"$ac_try\"") >&5
4015   (eval $ac_try) 2>&5
4016   ac_status=$?
4017   echo "$as_me:4017: \$? = $ac_status" >&5
4018   (exit "$ac_status"); }; }; then
4019   cf_cv_gnu_source=no
4020 else
4021   echo "$as_me: failed program was:" >&5
4022 cat "conftest.$ac_ext" >&5
4023 cf_save="$CPPFLAGS"
4024
4025 cf_fix_cppflags=no
4026 cf_new_cflags=
4027 cf_new_cppflags=
4028 cf_new_extra_cppflags=
4029
4030 for cf_add_cflags in -D_GNU_SOURCE
4031 do
4032 case "$cf_fix_cppflags" in
4033 (no)
4034         case "$cf_add_cflags" in
4035         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4036                 case "$cf_add_cflags" in
4037                 (-D*)
4038                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4039
4040                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4041                                 && test -z "${cf_tst_cflags}" \
4042                                 && cf_fix_cppflags=yes
4043
4044                         if test "$cf_fix_cppflags" = yes ; then
4045
4046         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4047         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4048
4049                                 continue
4050                         elif test "${cf_tst_cflags}" = "\"'" ; then
4051
4052         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4053         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4054
4055                                 continue
4056                         fi
4057                         ;;
4058                 esac
4059                 case "$CPPFLAGS" in
4060                 (*$cf_add_cflags)
4061                         ;;
4062                 (*)
4063                         case "$cf_add_cflags" in
4064                         (-D*)
4065                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4066
4067 CPPFLAGS=`echo "$CPPFLAGS" | \
4068         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4069                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4070
4071                                 ;;
4072                         esac
4073
4074         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4075         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4076
4077                         ;;
4078                 esac
4079                 ;;
4080         (*)
4081
4082         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4083         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4084
4085                 ;;
4086         esac
4087         ;;
4088 (yes)
4089
4090         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4091         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4092
4093         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4094
4095         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4096                 && test -z "${cf_tst_cflags}" \
4097                 && cf_fix_cppflags=no
4098         ;;
4099 esac
4100 done
4101
4102 if test -n "$cf_new_cflags" ; then
4103
4104         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4105         CFLAGS="${CFLAGS}$cf_new_cflags"
4106
4107 fi
4108
4109 if test -n "$cf_new_cppflags" ; then
4110
4111         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4112         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4113
4114 fi
4115
4116 if test -n "$cf_new_extra_cppflags" ; then
4117
4118         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4119         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4120
4121 fi
4122
4123                          cat >"conftest.$ac_ext" <<_ACEOF
4124 #line 4124 "configure"
4125 #include "confdefs.h"
4126 #include <sys/types.h>
4127 int
4128 main (void)
4129 {
4130
4131                                 #ifdef _XOPEN_SOURCE
4132                                 #error  expected _XOPEN_SOURCE to be undefined
4133                                 #endif
4134   ;
4135   return 0;
4136 }
4137 _ACEOF
4138 rm -f "conftest.$ac_objext"
4139 if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
4140   (eval $ac_compile) 2>&5
4141   ac_status=$?
4142   echo "$as_me:4142: \$? = $ac_status" >&5
4143   (exit "$ac_status"); } &&
4144          { ac_try='test -s "conftest.$ac_objext"'
4145   { (eval echo "$as_me:4145: \"$ac_try\"") >&5
4146   (eval $ac_try) 2>&5
4147   ac_status=$?
4148   echo "$as_me:4148: \$? = $ac_status" >&5
4149   (exit "$ac_status"); }; }; then
4150   cf_cv_gnu_source=no
4151 else
4152   echo "$as_me: failed program was:" >&5
4153 cat "conftest.$ac_ext" >&5
4154 cf_cv_gnu_source=yes
4155 fi
4156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4157                         CPPFLAGS="$cf_save"
4158
4159 fi
4160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4161
4162 fi
4163 echo "$as_me:4163: result: $cf_cv_gnu_source" >&5
4164 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4165
4166                 if test "$cf_cv_gnu_source" = yes
4167                 then
4168                 echo "$as_me:4168: checking if we should also define _DEFAULT_SOURCE" >&5
4169 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4170 if test "${cf_cv_default_source+set}" = set; then
4171   echo $ECHO_N "(cached) $ECHO_C" >&6
4172 else
4173
4174         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4175         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4176
4177                         cat >"conftest.$ac_ext" <<_ACEOF
4178 #line 4178 "configure"
4179 #include "confdefs.h"
4180 #include <sys/types.h>
4181 int
4182 main (void)
4183 {
4184
4185                                 #ifdef _DEFAULT_SOURCE
4186                                 #error  expected _DEFAULT_SOURCE to be undefined
4187                                 #endif
4188   ;
4189   return 0;
4190 }
4191 _ACEOF
4192 rm -f "conftest.$ac_objext"
4193 if { (eval echo "$as_me:4193: \"$ac_compile\"") >&5
4194   (eval $ac_compile) 2>&5
4195   ac_status=$?
4196   echo "$as_me:4196: \$? = $ac_status" >&5
4197   (exit "$ac_status"); } &&
4198          { ac_try='test -s "conftest.$ac_objext"'
4199   { (eval echo "$as_me:4199: \"$ac_try\"") >&5
4200   (eval $ac_try) 2>&5
4201   ac_status=$?
4202   echo "$as_me:4202: \$? = $ac_status" >&5
4203   (exit "$ac_status"); }; }; then
4204   cf_cv_default_source=no
4205 else
4206   echo "$as_me: failed program was:" >&5
4207 cat "conftest.$ac_ext" >&5
4208 cf_cv_default_source=yes
4209 fi
4210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4211
4212 fi
4213 echo "$as_me:4213: result: $cf_cv_default_source" >&5
4214 echo "${ECHO_T}$cf_cv_default_source" >&6
4215                         if test "$cf_cv_default_source" = yes
4216                         then
4217
4218         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4219         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4220
4221                         fi
4222                 fi
4223         fi
4224
4225 fi
4226
4227         ;;
4228 (minix*)
4229         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4230         ;;
4231 (mirbsd*)
4232         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4233         cf_XOPEN_SOURCE=
4234
4235 if test "$cf_cv_posix_visible" = no; then
4236
4237 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4238
4239 cf_save_CFLAGS="$CFLAGS"
4240 cf_save_CPPFLAGS="$CPPFLAGS"
4241
4242 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4243         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4244                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4245
4246 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4247         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4248                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4249
4250 echo "$as_me:4250: checking if we should define _POSIX_C_SOURCE" >&5
4251 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4252 if test "${cf_cv_posix_c_source+set}" = set; then
4253   echo $ECHO_N "(cached) $ECHO_C" >&6
4254 else
4255
4256 echo "${as_me:-configure}:4256: testing if the symbol is already defined go no further ..." 1>&5
4257
4258         cat >"conftest.$ac_ext" <<_ACEOF
4259 #line 4259 "configure"
4260 #include "confdefs.h"
4261 #include <sys/types.h>
4262 int
4263 main (void)
4264 {
4265
4266 #ifndef _POSIX_C_SOURCE
4267 make an error
4268 #endif
4269   ;
4270   return 0;
4271 }
4272 _ACEOF
4273 rm -f "conftest.$ac_objext"
4274 if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275   (eval $ac_compile) 2>&5
4276   ac_status=$?
4277   echo "$as_me:4277: \$? = $ac_status" >&5
4278   (exit "$ac_status"); } &&
4279          { ac_try='test -s "conftest.$ac_objext"'
4280   { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4281   (eval $ac_try) 2>&5
4282   ac_status=$?
4283   echo "$as_me:4283: \$? = $ac_status" >&5
4284   (exit "$ac_status"); }; }; then
4285   cf_cv_posix_c_source=no
4286 else
4287   echo "$as_me: failed program was:" >&5
4288 cat "conftest.$ac_ext" >&5
4289 cf_want_posix_source=no
4290          case .$cf_POSIX_C_SOURCE in
4291          (.[12]??*)
4292                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4293                 ;;
4294          (.2)
4295                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4296                 cf_want_posix_source=yes
4297                 ;;
4298          (.*)
4299                 cf_want_posix_source=yes
4300                 ;;
4301          esac
4302          if test "$cf_want_posix_source" = yes ; then
4303                 cat >"conftest.$ac_ext" <<_ACEOF
4304 #line 4304 "configure"
4305 #include "confdefs.h"
4306 #include <sys/types.h>
4307 int
4308 main (void)
4309 {
4310
4311 #ifdef _POSIX_SOURCE
4312 make an error
4313 #endif
4314   ;
4315   return 0;
4316 }
4317 _ACEOF
4318 rm -f "conftest.$ac_objext"
4319 if { (eval echo "$as_me:4319: \"$ac_compile\"") >&5
4320   (eval $ac_compile) 2>&5
4321   ac_status=$?
4322   echo "$as_me:4322: \$? = $ac_status" >&5
4323   (exit "$ac_status"); } &&
4324          { ac_try='test -s "conftest.$ac_objext"'
4325   { (eval echo "$as_me:4325: \"$ac_try\"") >&5
4326   (eval $ac_try) 2>&5
4327   ac_status=$?
4328   echo "$as_me:4328: \$? = $ac_status" >&5
4329   (exit "$ac_status"); }; }; then
4330   :
4331 else
4332   echo "$as_me: failed program was:" >&5
4333 cat "conftest.$ac_ext" >&5
4334 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4335 fi
4336 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4337          fi
4338
4339 echo "${as_me:-configure}:4339: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4340
4341          CFLAGS="$cf_trim_CFLAGS"
4342          CPPFLAGS="$cf_trim_CPPFLAGS"
4343
4344         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4345         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4346
4347 echo "${as_me:-configure}:4347: testing if the second compile does not leave our definition intact error ..." 1>&5
4348
4349          cat >"conftest.$ac_ext" <<_ACEOF
4350 #line 4350 "configure"
4351 #include "confdefs.h"
4352 #include <sys/types.h>
4353 int
4354 main (void)
4355 {
4356
4357 #ifndef _POSIX_C_SOURCE
4358 make an error
4359 #endif
4360   ;
4361   return 0;
4362 }
4363 _ACEOF
4364 rm -f "conftest.$ac_objext"
4365 if { (eval echo "$as_me:4365: \"$ac_compile\"") >&5
4366   (eval $ac_compile) 2>&5
4367   ac_status=$?
4368   echo "$as_me:4368: \$? = $ac_status" >&5
4369   (exit "$ac_status"); } &&
4370          { ac_try='test -s "conftest.$ac_objext"'
4371   { (eval echo "$as_me:4371: \"$ac_try\"") >&5
4372   (eval $ac_try) 2>&5
4373   ac_status=$?
4374   echo "$as_me:4374: \$? = $ac_status" >&5
4375   (exit "$ac_status"); }; }; then
4376   :
4377 else
4378   echo "$as_me: failed program was:" >&5
4379 cat "conftest.$ac_ext" >&5
4380 cf_cv_posix_c_source=no
4381 fi
4382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4383          CFLAGS="$cf_save_CFLAGS"
4384          CPPFLAGS="$cf_save_CPPFLAGS"
4385
4386 fi
4387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4388
4389 fi
4390 echo "$as_me:4390: result: $cf_cv_posix_c_source" >&5
4391 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4392
4393 if test "$cf_cv_posix_c_source" != no ; then
4394         CFLAGS="$cf_trim_CFLAGS"
4395         CPPFLAGS="$cf_trim_CPPFLAGS"
4396
4397 cf_fix_cppflags=no
4398 cf_new_cflags=
4399 cf_new_cppflags=
4400 cf_new_extra_cppflags=
4401
4402 for cf_add_cflags in $cf_cv_posix_c_source
4403 do
4404 case "$cf_fix_cppflags" in
4405 (no)
4406         case "$cf_add_cflags" in
4407         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4408                 case "$cf_add_cflags" in
4409                 (-D*)
4410                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4411
4412                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4413                                 && test -z "${cf_tst_cflags}" \
4414                                 && cf_fix_cppflags=yes
4415
4416                         if test "$cf_fix_cppflags" = yes ; then
4417
4418         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4419         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4420
4421                                 continue
4422                         elif test "${cf_tst_cflags}" = "\"'" ; then
4423
4424         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4425         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4426
4427                                 continue
4428                         fi
4429                         ;;
4430                 esac
4431                 case "$CPPFLAGS" in
4432                 (*$cf_add_cflags)
4433                         ;;
4434                 (*)
4435                         case "$cf_add_cflags" in
4436                         (-D*)
4437                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4438
4439 CPPFLAGS=`echo "$CPPFLAGS" | \
4440         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4441                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4442
4443                                 ;;
4444                         esac
4445
4446         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4447         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4448
4449                         ;;
4450                 esac
4451                 ;;
4452         (*)
4453
4454         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4455         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4456
4457                 ;;
4458         esac
4459         ;;
4460 (yes)
4461
4462         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4463         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4464
4465         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4466
4467         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4468                 && test -z "${cf_tst_cflags}" \
4469                 && cf_fix_cppflags=no
4470         ;;
4471 esac
4472 done
4473
4474 if test -n "$cf_new_cflags" ; then
4475
4476         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4477         CFLAGS="${CFLAGS}$cf_new_cflags"
4478
4479 fi
4480
4481 if test -n "$cf_new_cppflags" ; then
4482
4483         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4484         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4485
4486 fi
4487
4488 if test -n "$cf_new_extra_cppflags" ; then
4489
4490         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4491         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4492
4493 fi
4494
4495 fi
4496
4497 fi # cf_cv_posix_visible
4498
4499         ;;
4500 (netbsd*)
4501         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4502         ;;
4503 (openbsd[4-9]*)
4504         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4505         cf_xopen_source="-D_BSD_SOURCE"
4506         cf_XOPEN_SOURCE=600
4507         ;;
4508 (openbsd*)
4509         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4510         ;;
4511 (osf[45]*)
4512         cf_xopen_source="-D_OSF_SOURCE"
4513         ;;
4514 (nto-qnx*)
4515         cf_xopen_source="-D_QNX_SOURCE"
4516         ;;
4517 (sco*)
4518         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4519         ;;
4520 (solaris2.*)
4521         cf_xopen_source="-D__EXTENSIONS__"
4522         cf_cv_xopen_source=broken
4523         ;;
4524 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4525         cf_XOPEN_SOURCE=
4526         cf_POSIX_C_SOURCE=
4527         ;;
4528 (*)
4529
4530 echo "$as_me:4530: checking if we should define _XOPEN_SOURCE" >&5
4531 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4532 if test "${cf_cv_xopen_source+set}" = set; then
4533   echo $ECHO_N "(cached) $ECHO_C" >&6
4534 else
4535
4536         cat >"conftest.$ac_ext" <<_ACEOF
4537 #line 4537 "configure"
4538 #include "confdefs.h"
4539
4540 #include <stdlib.h>
4541 #include <string.h>
4542 #include <sys/types.h>
4543
4544 int
4545 main (void)
4546 {
4547
4548 #ifndef _XOPEN_SOURCE
4549 make an error
4550 #endif
4551   ;
4552   return 0;
4553 }
4554 _ACEOF
4555 rm -f "conftest.$ac_objext"
4556 if { (eval echo "$as_me:4556: \"$ac_compile\"") >&5
4557   (eval $ac_compile) 2>&5
4558   ac_status=$?
4559   echo "$as_me:4559: \$? = $ac_status" >&5
4560   (exit "$ac_status"); } &&
4561          { ac_try='test -s "conftest.$ac_objext"'
4562   { (eval echo "$as_me:4562: \"$ac_try\"") >&5
4563   (eval $ac_try) 2>&5
4564   ac_status=$?
4565   echo "$as_me:4565: \$? = $ac_status" >&5
4566   (exit "$ac_status"); }; }; then
4567   cf_cv_xopen_source=no
4568 else
4569   echo "$as_me: failed program was:" >&5
4570 cat "conftest.$ac_ext" >&5
4571 cf_save="$CPPFLAGS"
4572
4573         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4574         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4575
4576          cat >"conftest.$ac_ext" <<_ACEOF
4577 #line 4577 "configure"
4578 #include "confdefs.h"
4579
4580 #include <stdlib.h>
4581 #include <string.h>
4582 #include <sys/types.h>
4583
4584 int
4585 main (void)
4586 {
4587
4588 #ifdef _XOPEN_SOURCE
4589 make an error
4590 #endif
4591   ;
4592   return 0;
4593 }
4594 _ACEOF
4595 rm -f "conftest.$ac_objext"
4596 if { (eval echo "$as_me:4596: \"$ac_compile\"") >&5
4597   (eval $ac_compile) 2>&5
4598   ac_status=$?
4599   echo "$as_me:4599: \$? = $ac_status" >&5
4600   (exit "$ac_status"); } &&
4601          { ac_try='test -s "conftest.$ac_objext"'
4602   { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4603   (eval $ac_try) 2>&5
4604   ac_status=$?
4605   echo "$as_me:4605: \$? = $ac_status" >&5
4606   (exit "$ac_status"); }; }; then
4607   cf_cv_xopen_source=no
4608 else
4609   echo "$as_me: failed program was:" >&5
4610 cat "conftest.$ac_ext" >&5
4611 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4612 fi
4613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4614         CPPFLAGS="$cf_save"
4615
4616 fi
4617 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4618
4619 fi
4620 echo "$as_me:4620: result: $cf_cv_xopen_source" >&5
4621 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4622
4623 if test "$cf_cv_xopen_source" != no ; then
4624
4625 CFLAGS=`echo "$CFLAGS" | \
4626         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4627                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4628
4629 CPPFLAGS=`echo "$CPPFLAGS" | \
4630         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4631                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4632
4633         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4634
4635 cf_fix_cppflags=no
4636 cf_new_cflags=
4637 cf_new_cppflags=
4638 cf_new_extra_cppflags=
4639
4640 for cf_add_cflags in $cf_temp_xopen_source
4641 do
4642 case "$cf_fix_cppflags" in
4643 (no)
4644         case "$cf_add_cflags" in
4645         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4646                 case "$cf_add_cflags" in
4647                 (-D*)
4648                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4649
4650                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4651                                 && test -z "${cf_tst_cflags}" \
4652                                 && cf_fix_cppflags=yes
4653
4654                         if test "$cf_fix_cppflags" = yes ; then
4655
4656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4658
4659                                 continue
4660                         elif test "${cf_tst_cflags}" = "\"'" ; then
4661
4662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4664
4665                                 continue
4666                         fi
4667                         ;;
4668                 esac
4669                 case "$CPPFLAGS" in
4670                 (*$cf_add_cflags)
4671                         ;;
4672                 (*)
4673                         case "$cf_add_cflags" in
4674                         (-D*)
4675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4676
4677 CPPFLAGS=`echo "$CPPFLAGS" | \
4678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4680
4681                                 ;;
4682                         esac
4683
4684         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4685         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4686
4687                         ;;
4688                 esac
4689                 ;;
4690         (*)
4691
4692         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4693         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4694
4695                 ;;
4696         esac
4697         ;;
4698 (yes)
4699
4700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4702
4703         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4704
4705         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4706                 && test -z "${cf_tst_cflags}" \
4707                 && cf_fix_cppflags=no
4708         ;;
4709 esac
4710 done
4711
4712 if test -n "$cf_new_cflags" ; then
4713
4714         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4715         CFLAGS="${CFLAGS}$cf_new_cflags"
4716
4717 fi
4718
4719 if test -n "$cf_new_cppflags" ; then
4720
4721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4722         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4723
4724 fi
4725
4726 if test -n "$cf_new_extra_cppflags" ; then
4727
4728         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4729         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4730
4731 fi
4732
4733 fi
4734
4735 if test "$cf_cv_posix_visible" = no; then
4736
4737 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4738
4739 cf_save_CFLAGS="$CFLAGS"
4740 cf_save_CPPFLAGS="$CPPFLAGS"
4741
4742 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4743         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4744                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4745
4746 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4747         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4748                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4749
4750 echo "$as_me:4750: checking if we should define _POSIX_C_SOURCE" >&5
4751 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4752 if test "${cf_cv_posix_c_source+set}" = set; then
4753   echo $ECHO_N "(cached) $ECHO_C" >&6
4754 else
4755
4756 echo "${as_me:-configure}:4756: testing if the symbol is already defined go no further ..." 1>&5
4757
4758         cat >"conftest.$ac_ext" <<_ACEOF
4759 #line 4759 "configure"
4760 #include "confdefs.h"
4761 #include <sys/types.h>
4762 int
4763 main (void)
4764 {
4765
4766 #ifndef _POSIX_C_SOURCE
4767 make an error
4768 #endif
4769   ;
4770   return 0;
4771 }
4772 _ACEOF
4773 rm -f "conftest.$ac_objext"
4774 if { (eval echo "$as_me:4774: \"$ac_compile\"") >&5
4775   (eval $ac_compile) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit "$ac_status"); } &&
4779          { ac_try='test -s "conftest.$ac_objext"'
4780   { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4781   (eval $ac_try) 2>&5
4782   ac_status=$?
4783   echo "$as_me:4783: \$? = $ac_status" >&5
4784   (exit "$ac_status"); }; }; then
4785   cf_cv_posix_c_source=no
4786 else
4787   echo "$as_me: failed program was:" >&5
4788 cat "conftest.$ac_ext" >&5
4789 cf_want_posix_source=no
4790          case .$cf_POSIX_C_SOURCE in
4791          (.[12]??*)
4792                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4793                 ;;
4794          (.2)
4795                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4796                 cf_want_posix_source=yes
4797                 ;;
4798          (.*)
4799                 cf_want_posix_source=yes
4800                 ;;
4801          esac
4802          if test "$cf_want_posix_source" = yes ; then
4803                 cat >"conftest.$ac_ext" <<_ACEOF
4804 #line 4804 "configure"
4805 #include "confdefs.h"
4806 #include <sys/types.h>
4807 int
4808 main (void)
4809 {
4810
4811 #ifdef _POSIX_SOURCE
4812 make an error
4813 #endif
4814   ;
4815   return 0;
4816 }
4817 _ACEOF
4818 rm -f "conftest.$ac_objext"
4819 if { (eval echo "$as_me:4819: \"$ac_compile\"") >&5
4820   (eval $ac_compile) 2>&5
4821   ac_status=$?
4822   echo "$as_me:4822: \$? = $ac_status" >&5
4823   (exit "$ac_status"); } &&
4824          { ac_try='test -s "conftest.$ac_objext"'
4825   { (eval echo "$as_me:4825: \"$ac_try\"") >&5
4826   (eval $ac_try) 2>&5
4827   ac_status=$?
4828   echo "$as_me:4828: \$? = $ac_status" >&5
4829   (exit "$ac_status"); }; }; then
4830   :
4831 else
4832   echo "$as_me: failed program was:" >&5
4833 cat "conftest.$ac_ext" >&5
4834 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4835 fi
4836 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4837          fi
4838
4839 echo "${as_me:-configure}:4839: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4840
4841          CFLAGS="$cf_trim_CFLAGS"
4842          CPPFLAGS="$cf_trim_CPPFLAGS"
4843
4844         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4845         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4846
4847 echo "${as_me:-configure}:4847: testing if the second compile does not leave our definition intact error ..." 1>&5
4848
4849          cat >"conftest.$ac_ext" <<_ACEOF
4850 #line 4850 "configure"
4851 #include "confdefs.h"
4852 #include <sys/types.h>
4853 int
4854 main (void)
4855 {
4856
4857 #ifndef _POSIX_C_SOURCE
4858 make an error
4859 #endif
4860   ;
4861   return 0;
4862 }
4863 _ACEOF
4864 rm -f "conftest.$ac_objext"
4865 if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
4866   (eval $ac_compile) 2>&5
4867   ac_status=$?
4868   echo "$as_me:4868: \$? = $ac_status" >&5
4869   (exit "$ac_status"); } &&
4870          { ac_try='test -s "conftest.$ac_objext"'
4871   { (eval echo "$as_me:4871: \"$ac_try\"") >&5
4872   (eval $ac_try) 2>&5
4873   ac_status=$?
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit "$ac_status"); }; }; then
4876   :
4877 else
4878   echo "$as_me: failed program was:" >&5
4879 cat "conftest.$ac_ext" >&5
4880 cf_cv_posix_c_source=no
4881 fi
4882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4883          CFLAGS="$cf_save_CFLAGS"
4884          CPPFLAGS="$cf_save_CPPFLAGS"
4885
4886 fi
4887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4888
4889 fi
4890 echo "$as_me:4890: result: $cf_cv_posix_c_source" >&5
4891 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4892
4893 if test "$cf_cv_posix_c_source" != no ; then
4894         CFLAGS="$cf_trim_CFLAGS"
4895         CPPFLAGS="$cf_trim_CPPFLAGS"
4896
4897 cf_fix_cppflags=no
4898 cf_new_cflags=
4899 cf_new_cppflags=
4900 cf_new_extra_cppflags=
4901
4902 for cf_add_cflags in $cf_cv_posix_c_source
4903 do
4904 case "$cf_fix_cppflags" in
4905 (no)
4906         case "$cf_add_cflags" in
4907         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4908                 case "$cf_add_cflags" in
4909                 (-D*)
4910                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4911
4912                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4913                                 && test -z "${cf_tst_cflags}" \
4914                                 && cf_fix_cppflags=yes
4915
4916                         if test "$cf_fix_cppflags" = yes ; then
4917
4918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4920
4921                                 continue
4922                         elif test "${cf_tst_cflags}" = "\"'" ; then
4923
4924         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4925         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4926
4927                                 continue
4928                         fi
4929                         ;;
4930                 esac
4931                 case "$CPPFLAGS" in
4932                 (*$cf_add_cflags)
4933                         ;;
4934                 (*)
4935                         case "$cf_add_cflags" in
4936                         (-D*)
4937                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4938
4939 CPPFLAGS=`echo "$CPPFLAGS" | \
4940         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4941                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4942
4943                                 ;;
4944                         esac
4945
4946         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4947         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4948
4949                         ;;
4950                 esac
4951                 ;;
4952         (*)
4953
4954         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4955         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4956
4957                 ;;
4958         esac
4959         ;;
4960 (yes)
4961
4962         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4963         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4964
4965         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4966
4967         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4968                 && test -z "${cf_tst_cflags}" \
4969                 && cf_fix_cppflags=no
4970         ;;
4971 esac
4972 done
4973
4974 if test -n "$cf_new_cflags" ; then
4975
4976         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4977         CFLAGS="${CFLAGS}$cf_new_cflags"
4978
4979 fi
4980
4981 if test -n "$cf_new_cppflags" ; then
4982
4983         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4984         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4985
4986 fi
4987
4988 if test -n "$cf_new_extra_cppflags" ; then
4989
4990         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4991         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4992
4993 fi
4994
4995 fi
4996
4997 fi # cf_cv_posix_visible
4998
4999         ;;
5000 esac
5001
5002 if test -n "$cf_xopen_source" ; then
5003
5004 cf_fix_cppflags=no
5005 cf_new_cflags=
5006 cf_new_cppflags=
5007 cf_new_extra_cppflags=
5008
5009 for cf_add_cflags in $cf_xopen_source
5010 do
5011 case "$cf_fix_cppflags" in
5012 (no)
5013         case "$cf_add_cflags" in
5014         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5015                 case "$cf_add_cflags" in
5016                 (-D*)
5017                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5018
5019                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5020                                 && test -z "${cf_tst_cflags}" \
5021                                 && cf_fix_cppflags=yes
5022
5023                         if test "$cf_fix_cppflags" = yes ; then
5024
5025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5027
5028                                 continue
5029                         elif test "${cf_tst_cflags}" = "\"'" ; then
5030
5031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5033
5034                                 continue
5035                         fi
5036                         ;;
5037                 esac
5038                 case "$CPPFLAGS" in
5039                 (*$cf_add_cflags)
5040                         ;;
5041                 (*)
5042                         case "$cf_add_cflags" in
5043                         (-D*)
5044                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5045
5046 CPPFLAGS=`echo "$CPPFLAGS" | \
5047         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
5048                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
5049
5050                                 ;;
5051                         esac
5052
5053         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5054         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5055
5056                         ;;
5057                 esac
5058                 ;;
5059         (*)
5060
5061         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5062         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5063
5064                 ;;
5065         esac
5066         ;;
5067 (yes)
5068
5069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5071
5072         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5073
5074         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5075                 && test -z "${cf_tst_cflags}" \
5076                 && cf_fix_cppflags=no
5077         ;;
5078 esac
5079 done
5080
5081 if test -n "$cf_new_cflags" ; then
5082         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
5083
5084 echo "${as_me:-configure}:5084: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5085
5086         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5087         CFLAGS="${CFLAGS}$cf_new_cflags"
5088
5089 fi
5090
5091 if test -n "$cf_new_cppflags" ; then
5092         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5093
5094 echo "${as_me:-configure}:5094: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5095
5096         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5097         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5098
5099 fi
5100
5101 if test -n "$cf_new_extra_cppflags" ; then
5102         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5103
5104 echo "${as_me:-configure}:5104: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5105
5106         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5107         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5108
5109 fi
5110
5111 fi
5112
5113 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5114         echo "$as_me:5114: checking if _XOPEN_SOURCE really is set" >&5
5115 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5116         cat >"conftest.$ac_ext" <<_ACEOF
5117 #line 5117 "configure"
5118 #include "confdefs.h"
5119 #include <stdlib.h>
5120 int
5121 main (void)
5122 {
5123
5124 #ifndef _XOPEN_SOURCE
5125 make an error
5126 #endif
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 rm -f "conftest.$ac_objext"
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit "$ac_status"); } &&
5137          { ac_try='test -s "conftest.$ac_objext"'
5138   { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139   (eval $ac_try) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit "$ac_status"); }; }; then
5143   cf_XOPEN_SOURCE_set=yes
5144 else
5145   echo "$as_me: failed program was:" >&5
5146 cat "conftest.$ac_ext" >&5
5147 cf_XOPEN_SOURCE_set=no
5148 fi
5149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5150         echo "$as_me:5150: result: $cf_XOPEN_SOURCE_set" >&5
5151 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5152         if test "$cf_XOPEN_SOURCE_set" = yes
5153         then
5154                 cat >"conftest.$ac_ext" <<_ACEOF
5155 #line 5155 "configure"
5156 #include "confdefs.h"
5157 #include <stdlib.h>
5158 int
5159 main (void)
5160 {
5161
5162 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5163 make an error
5164 #endif
5165   ;
5166   return 0;
5167 }
5168 _ACEOF
5169 rm -f "conftest.$ac_objext"
5170 if { (eval echo "$as_me:5170: \"$ac_compile\"") >&5
5171   (eval $ac_compile) 2>&5
5172   ac_status=$?
5173   echo "$as_me:5173: \$? = $ac_status" >&5
5174   (exit "$ac_status"); } &&
5175          { ac_try='test -s "conftest.$ac_objext"'
5176   { (eval echo "$as_me:5176: \"$ac_try\"") >&5
5177   (eval $ac_try) 2>&5
5178   ac_status=$?
5179   echo "$as_me:5179: \$? = $ac_status" >&5
5180   (exit "$ac_status"); }; }; then
5181   cf_XOPEN_SOURCE_set_ok=yes
5182 else
5183   echo "$as_me: failed program was:" >&5
5184 cat "conftest.$ac_ext" >&5
5185 cf_XOPEN_SOURCE_set_ok=no
5186 fi
5187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5188                 if test "$cf_XOPEN_SOURCE_set_ok" = no
5189                 then
5190                         { echo "$as_me:5190: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5191 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5192                 fi
5193         else
5194
5195 echo "$as_me:5195: checking if we should define _XOPEN_SOURCE" >&5
5196 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5197 if test "${cf_cv_xopen_source+set}" = set; then
5198   echo $ECHO_N "(cached) $ECHO_C" >&6
5199 else
5200
5201         cat >"conftest.$ac_ext" <<_ACEOF
5202 #line 5202 "configure"
5203 #include "confdefs.h"
5204
5205 #include <stdlib.h>
5206 #include <string.h>
5207 #include <sys/types.h>
5208
5209 int
5210 main (void)
5211 {
5212
5213 #ifndef _XOPEN_SOURCE
5214 make an error
5215 #endif
5216   ;
5217   return 0;
5218 }
5219 _ACEOF
5220 rm -f "conftest.$ac_objext"
5221 if { (eval echo "$as_me:5221: \"$ac_compile\"") >&5
5222   (eval $ac_compile) 2>&5
5223   ac_status=$?
5224   echo "$as_me:5224: \$? = $ac_status" >&5
5225   (exit "$ac_status"); } &&
5226          { ac_try='test -s "conftest.$ac_objext"'
5227   { (eval echo "$as_me:5227: \"$ac_try\"") >&5
5228   (eval $ac_try) 2>&5
5229   ac_status=$?
5230   echo "$as_me:5230: \$? = $ac_status" >&5
5231   (exit "$ac_status"); }; }; then
5232   cf_cv_xopen_source=no
5233 else
5234   echo "$as_me: failed program was:" >&5
5235 cat "conftest.$ac_ext" >&5
5236 cf_save="$CPPFLAGS"
5237
5238         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5239         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5240
5241          cat >"conftest.$ac_ext" <<_ACEOF
5242 #line 5242 "configure"
5243 #include "confdefs.h"
5244
5245 #include <stdlib.h>
5246 #include <string.h>
5247 #include <sys/types.h>
5248
5249 int
5250 main (void)
5251 {
5252
5253 #ifdef _XOPEN_SOURCE
5254 make an error
5255 #endif
5256   ;
5257   return 0;
5258 }
5259 _ACEOF
5260 rm -f "conftest.$ac_objext"
5261 if { (eval echo "$as_me:5261: \"$ac_compile\"") >&5
5262   (eval $ac_compile) 2>&5
5263   ac_status=$?
5264   echo "$as_me:5264: \$? = $ac_status" >&5
5265   (exit "$ac_status"); } &&
5266          { ac_try='test -s "conftest.$ac_objext"'
5267   { (eval echo "$as_me:5267: \"$ac_try\"") >&5
5268   (eval $ac_try) 2>&5
5269   ac_status=$?
5270   echo "$as_me:5270: \$? = $ac_status" >&5
5271   (exit "$ac_status"); }; }; then
5272   cf_cv_xopen_source=no
5273 else
5274   echo "$as_me: failed program was:" >&5
5275 cat "conftest.$ac_ext" >&5
5276 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5277 fi
5278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5279         CPPFLAGS="$cf_save"
5280
5281 fi
5282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5283
5284 fi
5285 echo "$as_me:5285: result: $cf_cv_xopen_source" >&5
5286 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5287
5288 if test "$cf_cv_xopen_source" != no ; then
5289
5290 CFLAGS=`echo "$CFLAGS" | \
5291         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
5292                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
5293
5294 CPPFLAGS=`echo "$CPPFLAGS" | \
5295         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
5296                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
5297
5298         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5299
5300 cf_fix_cppflags=no
5301 cf_new_cflags=
5302 cf_new_cppflags=
5303 cf_new_extra_cppflags=
5304
5305 for cf_add_cflags in $cf_temp_xopen_source
5306 do
5307 case "$cf_fix_cppflags" in
5308 (no)
5309         case "$cf_add_cflags" in
5310         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5311                 case "$cf_add_cflags" in
5312                 (-D*)
5313                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5314
5315                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5316                                 && test -z "${cf_tst_cflags}" \
5317                                 && cf_fix_cppflags=yes
5318
5319                         if test "$cf_fix_cppflags" = yes ; then
5320
5321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5323
5324                                 continue
5325                         elif test "${cf_tst_cflags}" = "\"'" ; then
5326
5327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5329
5330                                 continue
5331                         fi
5332                         ;;
5333                 esac
5334                 case "$CPPFLAGS" in
5335                 (*$cf_add_cflags)
5336                         ;;
5337                 (*)
5338                         case "$cf_add_cflags" in
5339                         (-D*)
5340                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5341
5342 CPPFLAGS=`echo "$CPPFLAGS" | \
5343         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
5344                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
5345
5346                                 ;;
5347                         esac
5348
5349         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5350         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5351
5352                         ;;
5353                 esac
5354                 ;;
5355         (*)
5356
5357         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5358         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5359
5360                 ;;
5361         esac
5362         ;;
5363 (yes)
5364
5365         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5366         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5367
5368         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5369
5370         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5371                 && test -z "${cf_tst_cflags}" \
5372                 && cf_fix_cppflags=no
5373         ;;
5374 esac
5375 done
5376
5377 if test -n "$cf_new_cflags" ; then
5378
5379         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5380         CFLAGS="${CFLAGS}$cf_new_cflags"
5381
5382 fi
5383
5384 if test -n "$cf_new_cppflags" ; then
5385
5386         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5387         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5388
5389 fi
5390
5391 if test -n "$cf_new_extra_cppflags" ; then
5392
5393         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5394         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5395
5396 fi
5397
5398 fi
5399
5400         fi
5401 fi
5402 fi # cf_cv_posix_visible
5403
5404 # Check whether --enable-largefile or --disable-largefile was given.
5405 if test "${enable_largefile+set}" = set; then
5406   enableval="$enable_largefile"
5407
5408 fi;
5409 if test "$enable_largefile" != no; then
5410
5411   echo "$as_me:5411: checking for special C compiler options needed for large files" >&5
5412 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
5413 if test "${ac_cv_sys_largefile_CC+set}" = set; then
5414   echo $ECHO_N "(cached) $ECHO_C" >&6
5415 else
5416   ac_cv_sys_largefile_CC=no
5417      if test "$GCC" != yes; then
5418        ac_save_CC=$CC
5419        while :; do
5420          # IRIX 6.2 and later do not support large files by default,
5421          # so use the C compiler's -n32 option if that helps.
5422          cat >"conftest.$ac_ext" <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5425 #include <sys/types.h>
5426  /* Check that off_t can represent 2**63 - 1 correctly.
5427     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5428     since some C++ compilers masquerading as C compilers
5429     incorrectly reject 9223372036854775807.  */
5430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5431   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5432                        && LARGE_OFF_T % 2147483647 == 1)
5433                       ? 1 : -1];
5434 int
5435 main (void)
5436 {
5437
5438   ;
5439   return 0;
5440 }
5441 _ACEOF
5442          rm -f "conftest.$ac_objext"
5443 if { (eval echo "$as_me:5443: \"$ac_compile\"") >&5
5444   (eval $ac_compile) 2>&5
5445   ac_status=$?
5446   echo "$as_me:5446: \$? = $ac_status" >&5
5447   (exit "$ac_status"); } &&
5448          { ac_try='test -s "conftest.$ac_objext"'
5449   { (eval echo "$as_me:5449: \"$ac_try\"") >&5
5450   (eval $ac_try) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit "$ac_status"); }; }; then
5454   break
5455 else
5456   echo "$as_me: failed program was:" >&5
5457 cat "conftest.$ac_ext" >&5
5458 fi
5459 rm -f "conftest.$ac_objext"
5460          CC="$CC -n32"
5461          rm -f "conftest.$ac_objext"
5462 if { (eval echo "$as_me:5462: \"$ac_compile\"") >&5
5463   (eval $ac_compile) 2>&5
5464   ac_status=$?
5465   echo "$as_me:5465: \$? = $ac_status" >&5
5466   (exit "$ac_status"); } &&
5467          { ac_try='test -s "conftest.$ac_objext"'
5468   { (eval echo "$as_me:5468: \"$ac_try\"") >&5
5469   (eval $ac_try) 2>&5
5470   ac_status=$?
5471   echo "$as_me:5471: \$? = $ac_status" >&5
5472   (exit "$ac_status"); }; }; then
5473   ac_cv_sys_largefile_CC=' -n32'; break
5474 else
5475   echo "$as_me: failed program was:" >&5
5476 cat "conftest.$ac_ext" >&5
5477 fi
5478 rm -f "conftest.$ac_objext"
5479          break
5480        done
5481        CC=$ac_save_CC
5482        rm -f "conftest.$ac_ext"
5483     fi
5484 fi
5485 echo "$as_me:5485: result: $ac_cv_sys_largefile_CC" >&5
5486 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
5487   if test "$ac_cv_sys_largefile_CC" != no; then
5488     CC=$CC$ac_cv_sys_largefile_CC
5489   fi
5490
5491   echo "$as_me:5491: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5492 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
5493 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5494   echo $ECHO_N "(cached) $ECHO_C" >&6
5495 else
5496   while :; do
5497   ac_cv_sys_file_offset_bits=no
5498   cat >"conftest.$ac_ext" <<_ACEOF
5499 #line 5499 "configure"
5500 #include "confdefs.h"
5501 #include <sys/types.h>
5502  /* Check that off_t can represent 2**63 - 1 correctly.
5503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5504     since some C++ compilers masquerading as C compilers
5505     incorrectly reject 9223372036854775807.  */
5506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5508                        && LARGE_OFF_T % 2147483647 == 1)
5509                       ? 1 : -1];
5510 int
5511 main (void)
5512 {
5513
5514   ;
5515   return 0;
5516 }
5517 _ACEOF
5518 rm -f "conftest.$ac_objext"
5519 if { (eval echo "$as_me:5519: \"$ac_compile\"") >&5
5520   (eval $ac_compile) 2>&5
5521   ac_status=$?
5522   echo "$as_me:5522: \$? = $ac_status" >&5
5523   (exit "$ac_status"); } &&
5524          { ac_try='test -s "conftest.$ac_objext"'
5525   { (eval echo "$as_me:5525: \"$ac_try\"") >&5
5526   (eval $ac_try) 2>&5
5527   ac_status=$?
5528   echo "$as_me:5528: \$? = $ac_status" >&5
5529   (exit "$ac_status"); }; }; then
5530   break
5531 else
5532   echo "$as_me: failed program was:" >&5
5533 cat "conftest.$ac_ext" >&5
5534 fi
5535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5536   cat >"conftest.$ac_ext" <<_ACEOF
5537 #line 5537 "configure"
5538 #include "confdefs.h"
5539 #define _FILE_OFFSET_BITS 64
5540 #include <sys/types.h>
5541  /* Check that off_t can represent 2**63 - 1 correctly.
5542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5543     since some C++ compilers masquerading as C compilers
5544     incorrectly reject 9223372036854775807.  */
5545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5547                        && LARGE_OFF_T % 2147483647 == 1)
5548                       ? 1 : -1];
5549 int
5550 main (void)
5551 {
5552
5553   ;
5554   return 0;
5555 }
5556 _ACEOF
5557 rm -f "conftest.$ac_objext"
5558 if { (eval echo "$as_me:5558: \"$ac_compile\"") >&5
5559   (eval $ac_compile) 2>&5
5560   ac_status=$?
5561   echo "$as_me:5561: \$? = $ac_status" >&5
5562   (exit "$ac_status"); } &&
5563          { ac_try='test -s "conftest.$ac_objext"'
5564   { (eval echo "$as_me:5564: \"$ac_try\"") >&5
5565   (eval $ac_try) 2>&5
5566   ac_status=$?
5567   echo "$as_me:5567: \$? = $ac_status" >&5
5568   (exit "$ac_status"); }; }; then
5569   ac_cv_sys_file_offset_bits=64; break
5570 else
5571   echo "$as_me: failed program was:" >&5
5572 cat "conftest.$ac_ext" >&5
5573 fi
5574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5575   break
5576 done
5577 fi
5578 echo "$as_me:5578: result: $ac_cv_sys_file_offset_bits" >&5
5579 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5580 if test "$ac_cv_sys_file_offset_bits" != no; then
5581
5582 cat >>confdefs.h <<EOF
5583 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5584 EOF
5585
5586 fi
5587 rm -rf conftest*
5588   echo "$as_me:5588: checking for _LARGE_FILES value needed for large files" >&5
5589 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5590 if test "${ac_cv_sys_large_files+set}" = set; then
5591   echo $ECHO_N "(cached) $ECHO_C" >&6
5592 else
5593   while :; do
5594   ac_cv_sys_large_files=no
5595   cat >"conftest.$ac_ext" <<_ACEOF
5596 #line 5596 "configure"
5597 #include "confdefs.h"
5598 #include <sys/types.h>
5599  /* Check that off_t can represent 2**63 - 1 correctly.
5600     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5601     since some C++ compilers masquerading as C compilers
5602     incorrectly reject 9223372036854775807.  */
5603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5604   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5605                        && LARGE_OFF_T % 2147483647 == 1)
5606                       ? 1 : -1];
5607 int
5608 main (void)
5609 {
5610
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 rm -f "conftest.$ac_objext"
5616 if { (eval echo "$as_me:5616: \"$ac_compile\"") >&5
5617   (eval $ac_compile) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit "$ac_status"); } &&
5621          { ac_try='test -s "conftest.$ac_objext"'
5622   { (eval echo "$as_me:5622: \"$ac_try\"") >&5
5623   (eval $ac_try) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit "$ac_status"); }; }; then
5627   break
5628 else
5629   echo "$as_me: failed program was:" >&5
5630 cat "conftest.$ac_ext" >&5
5631 fi
5632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5633   cat >"conftest.$ac_ext" <<_ACEOF
5634 #line 5634 "configure"
5635 #include "confdefs.h"
5636 #define _LARGE_FILES 1
5637 #include <sys/types.h>
5638  /* Check that off_t can represent 2**63 - 1 correctly.
5639     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5640     since some C++ compilers masquerading as C compilers
5641     incorrectly reject 9223372036854775807.  */
5642 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5643   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5644                        && LARGE_OFF_T % 2147483647 == 1)
5645                       ? 1 : -1];
5646 int
5647 main (void)
5648 {
5649
5650   ;
5651   return 0;
5652 }
5653 _ACEOF
5654 rm -f "conftest.$ac_objext"
5655 if { (eval echo "$as_me:5655: \"$ac_compile\"") >&5
5656   (eval $ac_compile) 2>&5
5657   ac_status=$?
5658   echo "$as_me:5658: \$? = $ac_status" >&5
5659   (exit "$ac_status"); } &&
5660          { ac_try='test -s "conftest.$ac_objext"'
5661   { (eval echo "$as_me:5661: \"$ac_try\"") >&5
5662   (eval $ac_try) 2>&5
5663   ac_status=$?
5664   echo "$as_me:5664: \$? = $ac_status" >&5
5665   (exit "$ac_status"); }; }; then
5666   ac_cv_sys_large_files=1; break
5667 else
5668   echo "$as_me: failed program was:" >&5
5669 cat "conftest.$ac_ext" >&5
5670 fi
5671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5672   break
5673 done
5674 fi
5675 echo "$as_me:5675: result: $ac_cv_sys_large_files" >&5
5676 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5677 if test "$ac_cv_sys_large_files" != no; then
5678
5679 cat >>confdefs.h <<EOF
5680 #define _LARGE_FILES $ac_cv_sys_large_files
5681 EOF
5682
5683 fi
5684 rm -rf conftest*
5685 fi
5686
5687         if test "$enable_largefile" != no ; then
5688         echo "$as_me:5688: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5689 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
5690 if test "${ac_cv_sys_largefile_source+set}" = set; then
5691   echo $ECHO_N "(cached) $ECHO_C" >&6
5692 else
5693   while :; do
5694   ac_cv_sys_largefile_source=no
5695   cat >"conftest.$ac_ext" <<_ACEOF
5696 #line 5696 "configure"
5697 #include "confdefs.h"
5698 #include <stdio.h>
5699 int
5700 main (void)
5701 {
5702 return !fseeko;
5703   ;
5704   return 0;
5705 }
5706 _ACEOF
5707 rm -f "conftest.$ac_objext"
5708 if { (eval echo "$as_me:5708: \"$ac_compile\"") >&5
5709   (eval $ac_compile) 2>&5
5710   ac_status=$?
5711   echo "$as_me:5711: \$? = $ac_status" >&5
5712   (exit "$ac_status"); } &&
5713          { ac_try='test -s "conftest.$ac_objext"'
5714   { (eval echo "$as_me:5714: \"$ac_try\"") >&5
5715   (eval $ac_try) 2>&5
5716   ac_status=$?
5717   echo "$as_me:5717: \$? = $ac_status" >&5
5718   (exit "$ac_status"); }; }; then
5719   break
5720 else
5721   echo "$as_me: failed program was:" >&5
5722 cat "conftest.$ac_ext" >&5
5723 fi
5724 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5725   cat >"conftest.$ac_ext" <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5728 #define _LARGEFILE_SOURCE 1
5729 #include <stdio.h>
5730 int
5731 main (void)
5732 {
5733 return !fseeko;
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f "conftest.$ac_objext"
5739 if { (eval echo "$as_me:5739: \"$ac_compile\"") >&5
5740   (eval $ac_compile) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit "$ac_status"); } &&
5744          { ac_try='test -s "conftest.$ac_objext"'
5745   { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit "$ac_status"); }; }; then
5750   ac_cv_sys_largefile_source=1; break
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat "conftest.$ac_ext" >&5
5754 fi
5755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5756   break
5757 done
5758 fi
5759 echo "$as_me:5759: result: $ac_cv_sys_largefile_source" >&5
5760 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
5761 if test "$ac_cv_sys_largefile_source" != no; then
5762
5763 cat >>confdefs.h <<EOF
5764 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5765 EOF
5766
5767 fi
5768 rm -rf conftest*
5769
5770 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5771 # in glibc 2.1.3, but that breaks too many other things.
5772 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5773 echo "$as_me:5773: checking for fseeko" >&5
5774 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
5775 if test "${ac_cv_func_fseeko+set}" = set; then
5776   echo $ECHO_N "(cached) $ECHO_C" >&6
5777 else
5778   cat >"conftest.$ac_ext" <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781 #include <stdio.h>
5782 int
5783 main (void)
5784 {
5785 return fseeko && fseeko (stdin, 0, 0);
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5791 if { (eval echo "$as_me:5791: \"$ac_link\"") >&5
5792   (eval $ac_link) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit "$ac_status"); } &&
5796          { ac_try='test -s "conftest$ac_exeext"'
5797   { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:5800: \$? = $ac_status" >&5
5801   (exit "$ac_status"); }; }; then
5802   ac_cv_func_fseeko=yes
5803 else
5804   echo "$as_me: failed program was:" >&5
5805 cat "conftest.$ac_ext" >&5
5806 ac_cv_func_fseeko=no
5807 fi
5808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5809 fi
5810 echo "$as_me:5810: result: $ac_cv_func_fseeko" >&5
5811 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
5812 if test $ac_cv_func_fseeko = yes; then
5813
5814 cat >>confdefs.h <<\EOF
5815 #define HAVE_FSEEKO 1
5816 EOF
5817
5818 fi
5819
5820         # Normally we would collect these definitions in the config.h,
5821         # but (like _XOPEN_SOURCE), some environments rely on having these
5822         # defined before any of the system headers are included.  Another
5823         # case comes up with C++, e.g., on AIX the compiler compiles the
5824         # header files by themselves before looking at the body files it is
5825         # told to compile.  For ncurses, those header files do not include
5826         # the config.h
5827         if test "$ac_cv_sys_large_files" != no
5828         then
5829
5830         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5831         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
5832
5833         fi
5834         if test "$ac_cv_sys_largefile_source" != no
5835         then
5836
5837         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5838         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
5839
5840         fi
5841         if test "$ac_cv_sys_file_offset_bits" != no
5842         then
5843
5844         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5845         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5846
5847         fi
5848
5849         echo "$as_me:5849: checking whether to use struct dirent64" >&5
5850 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
5851 if test "${cf_cv_struct_dirent64+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854
5855                 cat >"conftest.$ac_ext" <<_ACEOF
5856 #line 5856 "configure"
5857 #include "confdefs.h"
5858
5859 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
5860 #include <sys/types.h>
5861 #include <dirent.h>
5862
5863 int
5864 main (void)
5865 {
5866
5867                 /* if transitional largefile support is setup, this is true */
5868                 extern struct dirent64 * readdir(DIR *);
5869                 struct dirent64 *x = readdir((DIR *)0);
5870                 struct dirent *y = readdir((DIR *)0);
5871                 int z = x - y;
5872                 (void)z;
5873
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f "conftest.$ac_objext"
5879 if { (eval echo "$as_me:5879: \"$ac_compile\"") >&5
5880   (eval $ac_compile) 2>&5
5881   ac_status=$?
5882   echo "$as_me:5882: \$? = $ac_status" >&5
5883   (exit "$ac_status"); } &&
5884          { ac_try='test -s "conftest.$ac_objext"'
5885   { (eval echo "$as_me:5885: \"$ac_try\"") >&5
5886   (eval $ac_try) 2>&5
5887   ac_status=$?
5888   echo "$as_me:5888: \$? = $ac_status" >&5
5889   (exit "$ac_status"); }; }; then
5890   cf_cv_struct_dirent64=yes
5891 else
5892   echo "$as_me: failed program was:" >&5
5893 cat "conftest.$ac_ext" >&5
5894 cf_cv_struct_dirent64=no
5895 fi
5896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5897
5898 fi
5899 echo "$as_me:5899: result: $cf_cv_struct_dirent64" >&5
5900 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
5901         test "$cf_cv_struct_dirent64" = yes &&
5902 cat >>confdefs.h <<\EOF
5903 #define HAVE_STRUCT_DIRENT64 1
5904 EOF
5905
5906         fi
5907
5908 echo "$as_me:5908: checking for install-prefix" >&5
5909 echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
5910
5911 # Check whether --with-install-prefix or --without-install-prefix was given.
5912 if test "${with_install_prefix+set}" = set; then
5913   withval="$with_install_prefix"
5914   cf_opt_with_install_prefix=$withval
5915 else
5916   cf_opt_with_install_prefix=${DESTDIR:-no}
5917 fi;
5918 echo "$as_me:5918: result: $cf_opt_with_install_prefix" >&5
5919 echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
5920 if test "$cf_opt_with_install_prefix" != no ; then
5921
5922 if test "x$prefix" != xNONE; then
5923         cf_path_syntax="$prefix"
5924 else
5925         cf_path_syntax="$ac_default_prefix"
5926 fi
5927
5928 case ".$cf_opt_with_install_prefix" in
5929 (.\$\(*\)*|.\'*\'*)
5930         ;;
5931 (..|./*|.\\*)
5932         ;;
5933 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5934         ;;
5935 (.\$\{*prefix\}*|.\$\{*dir\}*)
5936         eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
5937         case ".$cf_opt_with_install_prefix" in
5938         (.NONE/*)
5939                 cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
5940                 ;;
5941         esac
5942         ;;
5943 (.no|.NONE/*)
5944         cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
5945         ;;
5946 (*)
5947         { { echo "$as_me:5947: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
5948 echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
5949    { (exit 1); exit 1; }; }
5950         ;;
5951 esac
5952
5953         DESTDIR=$cf_opt_with_install_prefix
5954 fi
5955
5956 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
5957 then
5958         echo "$as_me:5958: checking for X" >&5
5959 echo $ECHO_N "checking for X... $ECHO_C" >&6
5960
5961 # Check whether --with-x or --without-x was given.
5962 if test "${with_x+set}" = set; then
5963   withval="$with_x"
5964
5965 fi;
5966 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5967 if test "x$with_x" = xno; then
5968   # The user explicitly disabled X.
5969   have_x=disabled
5970 else
5971   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5972     # Both variables are already set.
5973     have_x=yes
5974   else
5975     if test "${ac_cv_have_x+set}" = set; then
5976   echo $ECHO_N "(cached) $ECHO_C" >&6
5977 else
5978   # One or both of the vars are not set, and there is no cached value.
5979 ac_x_includes=no ac_x_libraries=no
5980 rm -fr conftest.dir
5981 if mkdir conftest.dir; then
5982   cd conftest.dir
5983   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5984   cat >Imakefile <<'EOF'
5985 acfindx:
5986         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5987 EOF
5988   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5989     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5990     eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
5991     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5992     for ac_extension in a so sl dylib dll; do
5993       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
5994          test -f "$ac_im_libdir/libX11.$ac_extension"; then
5995         ac_im_usrlibdir=$ac_im_libdir; break
5996       fi
5997     done
5998     # Screen out bogus values from the imake configuration.  They are
5999     # bogus both because they are the default anyway, and because
6000     # using them would break gcc on systems where it needs fixed includes.
6001     case $ac_im_incroot in
6002         /usr/include) ;;
6003         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6004     esac
6005     case $ac_im_usrlibdir in
6006         /usr/lib | /lib) ;;
6007         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6008     esac
6009   fi
6010   cd ..
6011   rm -fr conftest.dir
6012 fi
6013
6014 # Standard set of common directories for X headers.
6015 # Check X11 before X11Rn because it is often a symlink to the current release.
6016 ac_x_header_dirs='
6017 /usr/X11/include
6018 /usr/X11R7/include
6019 /usr/X11R6/include
6020 /usr/X11R5/include
6021 /usr/X11R4/include
6022
6023 /opt/local/include
6024 /opt/X11/include
6025
6026 /usr/include/X11
6027 /usr/include/X11R7
6028 /usr/include/X11R6
6029 /usr/include/X11R5
6030 /usr/include/X11R4
6031
6032 /usr/local/X11/include
6033 /usr/local/X11R7/include
6034 /usr/local/X11R6/include
6035 /usr/local/X11R5/include
6036 /usr/local/X11R4/include
6037
6038 /usr/local/include/X11
6039 /usr/local/include/X11R7
6040 /usr/local/include/X11R6
6041 /usr/local/include/X11R5
6042 /usr/local/include/X11R4
6043
6044 /usr/X386/include
6045 /usr/x386/include
6046 /usr/XFree86/include/X11
6047
6048 /usr/include
6049 /usr/local/include
6050 /usr/unsupported/include
6051 /usr/athena/include
6052 /usr/local/x11r5/include
6053 /usr/lpp/Xamples/include
6054
6055 /usr/openwin/include
6056 /usr/openwin/share/include'
6057
6058 if test "$ac_x_includes" = no; then
6059   # Guess where to find include files, by looking for Intrinsic.h.
6060   # First, try using that file with no special directory specified.
6061   cat >"conftest.$ac_ext" <<_ACEOF
6062 #line 6062 "configure"
6063 #include "confdefs.h"
6064 #include <X11/Intrinsic.h>
6065 _ACEOF
6066 if { (eval echo "$as_me:6066: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6067   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6068   ac_status=$?
6069   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6070   rm -f conftest.er1
6071   cat conftest.err >&5
6072   echo "$as_me:6072: \$? = $ac_status" >&5
6073   (exit "$ac_status"); } >/dev/null; then
6074   if test -s conftest.err; then
6075     ac_cpp_err=$ac_c_preproc_warn_flag
6076   else
6077     ac_cpp_err=
6078   fi
6079 else
6080   ac_cpp_err=yes
6081 fi
6082 if test -z "$ac_cpp_err"; then
6083   # We can compile using X headers with no special include directory.
6084 ac_x_includes=
6085 else
6086   echo "$as_me: failed program was:" >&5
6087   cat "conftest.$ac_ext" >&5
6088   for ac_dir in $ac_x_header_dirs; do
6089   if test -r "$ac_dir/X11/Intrinsic.h"; then
6090     ac_x_includes=$ac_dir
6091     break
6092   fi
6093 done
6094 fi
6095 rm -f conftest.err "conftest.$ac_ext"
6096 fi # $ac_x_includes = no
6097
6098 if test "$ac_x_libraries" = no; then
6099   # Check for the libraries.
6100   # See if we find them without any special options.
6101   # Don't add to $LIBS permanently.
6102   ac_save_LIBS=$LIBS
6103   LIBS="-lXt $LIBS"
6104   cat >"conftest.$ac_ext" <<_ACEOF
6105 #line 6105 "configure"
6106 #include "confdefs.h"
6107 #include <X11/Intrinsic.h>
6108 int
6109 main (void)
6110 {
6111 XtMalloc (0)
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6117 if { (eval echo "$as_me:6117: \"$ac_link\"") >&5
6118   (eval $ac_link) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); } &&
6122          { ac_try='test -s "conftest$ac_exeext"'
6123   { (eval echo "$as_me:6123: \"$ac_try\"") >&5
6124   (eval $ac_try) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit "$ac_status"); }; }; then
6128   LIBS=$ac_save_LIBS
6129 # We can link X programs with no special library path.
6130 ac_x_libraries=
6131 else
6132   echo "$as_me: failed program was:" >&5
6133 cat "conftest.$ac_ext" >&5
6134 LIBS=$ac_save_LIBS
6135 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6136 do
6137   # Don't even attempt the hair of trying to link an X program!
6138   for ac_extension in a so sl dylib dll; do
6139     if test -r "$ac_dir/libXt.$ac_extension"; then
6140       ac_x_libraries=$ac_dir
6141       break 2
6142     fi
6143   done
6144 done
6145 fi
6146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6147 fi # $ac_x_libraries = no
6148
6149 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6150   # Didn't find X anywhere.  Cache the known absence of X.
6151   ac_cv_have_x="have_x=no"
6152 else
6153   # Record where we found X for the cache.
6154   ac_cv_have_x="have_x=yes \
6155                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6156 fi
6157 fi
6158
6159   fi
6160   eval "$ac_cv_have_x"
6161 fi # $with_x != no
6162
6163 if test "$have_x" != yes; then
6164   echo "$as_me:6164: result: $have_x" >&5
6165 echo "${ECHO_T}$have_x" >&6
6166   no_x=yes
6167 else
6168   # If each of the values was on the command line, it overrides each guess.
6169   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6170   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6171   # Update the cache value to reflect the command line values.
6172   ac_cv_have_x="have_x=yes \
6173                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6174   echo "$as_me:6174: result: libraries $x_libraries, headers $x_includes" >&5
6175 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6176 fi
6177
6178         if test "$no_x" = yes; then
6179   # Not all programs may use this symbol, but it does not hurt to define it.
6180
6181 cat >>confdefs.h <<\EOF
6182 #define X_DISPLAY_MISSING 1
6183 EOF
6184
6185   X_CFLAGS=
6186   X_PRE_LIBS=
6187   X_LIBS=
6188   X_EXTRA_LIBS=
6189 else
6190   if test -n "$x_includes"; then
6191     X_CFLAGS="$X_CFLAGS -I$x_includes"
6192   fi
6193
6194   # It would also be nice to do this for all -L options, not just this one.
6195   if test -n "$x_libraries"; then
6196     X_LIBS="$X_LIBS -L$x_libraries"
6197     # For Solaris; some versions of Sun CC require a space after -R and
6198     # others require no space.  Words are not sufficient . . . .
6199     case `(uname -sr) 2>/dev/null` in
6200     "SunOS 5"*)
6201       echo "$as_me:6201: checking whether -R must be followed by a space" >&5
6202 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
6203       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6204       cat >"conftest.$ac_ext" <<_ACEOF
6205 #line 6205 "configure"
6206 #include "confdefs.h"
6207
6208 int
6209 main (void)
6210 {
6211
6212   ;
6213   return 0;
6214 }
6215 _ACEOF
6216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6217 if { (eval echo "$as_me:6217: \"$ac_link\"") >&5
6218   (eval $ac_link) 2>&5
6219   ac_status=$?
6220   echo "$as_me:6220: \$? = $ac_status" >&5
6221   (exit "$ac_status"); } &&
6222          { ac_try='test -s "conftest$ac_exeext"'
6223   { (eval echo "$as_me:6223: \"$ac_try\"") >&5
6224   (eval $ac_try) 2>&5
6225   ac_status=$?
6226   echo "$as_me:6226: \$? = $ac_status" >&5
6227   (exit "$ac_status"); }; }; then
6228   ac_R_nospace=yes
6229 else
6230   echo "$as_me: failed program was:" >&5
6231 cat "conftest.$ac_ext" >&5
6232 ac_R_nospace=no
6233 fi
6234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6235       if test $ac_R_nospace = yes; then
6236         echo "$as_me:6236: result: no" >&5
6237 echo "${ECHO_T}no" >&6
6238         X_LIBS="$X_LIBS -R$x_libraries"
6239       else
6240         LIBS="$ac_xsave_LIBS -R $x_libraries"
6241         cat >"conftest.$ac_ext" <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6244
6245 int
6246 main (void)
6247 {
6248
6249   ;
6250   return 0;
6251 }
6252 _ACEOF
6253 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6254 if { (eval echo "$as_me:6254: \"$ac_link\"") >&5
6255   (eval $ac_link) 2>&5
6256   ac_status=$?
6257   echo "$as_me:6257: \$? = $ac_status" >&5
6258   (exit "$ac_status"); } &&
6259          { ac_try='test -s "conftest$ac_exeext"'
6260   { (eval echo "$as_me:6260: \"$ac_try\"") >&5
6261   (eval $ac_try) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit "$ac_status"); }; }; then
6265   ac_R_space=yes
6266 else
6267   echo "$as_me: failed program was:" >&5
6268 cat "conftest.$ac_ext" >&5
6269 ac_R_space=no
6270 fi
6271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6272         if test $ac_R_space = yes; then
6273           echo "$as_me:6273: result: yes" >&5
6274 echo "${ECHO_T}yes" >&6
6275           X_LIBS="$X_LIBS -R $x_libraries"
6276         else
6277           echo "$as_me:6277: result: neither works" >&5
6278 echo "${ECHO_T}neither works" >&6
6279         fi
6280       fi
6281       LIBS=$ac_xsave_LIBS
6282     esac
6283   fi
6284
6285   # Check for system-dependent libraries X programs must link with.
6286   # Do this before checking for the system-independent R6 libraries
6287   # (-lICE), since we may need -lsocket or whatever for X linking.
6288
6289   if test "$ISC" = yes; then
6290     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6291   else
6292     # Martyn Johnson says this is needed for Ultrix, if the X
6293     # libraries were built with DECnet support.  And Karl Berry says
6294     # the Alpha needs dnet_stub (dnet does not exist).
6295     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6296     cat >"conftest.$ac_ext" <<_ACEOF
6297 #line 6297 "configure"
6298 #include "confdefs.h"
6299
6300 /* Override any gcc2 internal prototype to avoid an error.  */
6301 #ifdef __cplusplus
6302 extern "C"
6303 #endif
6304 /* We use char because int might match the return type of a gcc2
6305    builtin and then its argument prototype would still apply.  */
6306 char XOpenDisplay ();
6307 int
6308 main (void)
6309 {
6310 XOpenDisplay ();
6311   ;
6312   return 0;
6313 }
6314 _ACEOF
6315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6316 if { (eval echo "$as_me:6316: \"$ac_link\"") >&5
6317   (eval $ac_link) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit "$ac_status"); } &&
6321          { ac_try='test -s "conftest$ac_exeext"'
6322   { (eval echo "$as_me:6322: \"$ac_try\"") >&5
6323   (eval $ac_try) 2>&5
6324   ac_status=$?
6325   echo "$as_me:6325: \$? = $ac_status" >&5
6326   (exit "$ac_status"); }; }; then
6327   :
6328 else
6329   echo "$as_me: failed program was:" >&5
6330 cat "conftest.$ac_ext" >&5
6331 echo "$as_me:6331: checking for dnet_ntoa in -ldnet" >&5
6332 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6333 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6334   echo $ECHO_N "(cached) $ECHO_C" >&6
6335 else
6336   ac_check_lib_save_LIBS=$LIBS
6337 LIBS="-ldnet  $LIBS"
6338 cat >"conftest.$ac_ext" <<_ACEOF
6339 #line 6339 "configure"
6340 #include "confdefs.h"
6341
6342 /* Override any gcc2 internal prototype to avoid an error.  */
6343 #ifdef __cplusplus
6344 extern "C"
6345 #endif
6346 /* We use char because int might match the return type of a gcc2
6347    builtin and then its argument prototype would still apply.  */
6348 char dnet_ntoa ();
6349 int
6350 main (void)
6351 {
6352 dnet_ntoa ();
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6358 if { (eval echo "$as_me:6358: \"$ac_link\"") >&5
6359   (eval $ac_link) 2>&5
6360   ac_status=$?
6361   echo "$as_me:6361: \$? = $ac_status" >&5
6362   (exit "$ac_status"); } &&
6363          { ac_try='test -s "conftest$ac_exeext"'
6364   { (eval echo "$as_me:6364: \"$ac_try\"") >&5
6365   (eval $ac_try) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit "$ac_status"); }; }; then
6369   ac_cv_lib_dnet_dnet_ntoa=yes
6370 else
6371   echo "$as_me: failed program was:" >&5
6372 cat "conftest.$ac_ext" >&5
6373 ac_cv_lib_dnet_dnet_ntoa=no
6374 fi
6375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6376 LIBS=$ac_check_lib_save_LIBS
6377 fi
6378 echo "$as_me:6378: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6379 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6380 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
6381   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6382 fi
6383
6384     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6385       echo "$as_me:6385: checking for dnet_ntoa in -ldnet_stub" >&5
6386 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6387 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6388   echo $ECHO_N "(cached) $ECHO_C" >&6
6389 else
6390   ac_check_lib_save_LIBS=$LIBS
6391 LIBS="-ldnet_stub  $LIBS"
6392 cat >"conftest.$ac_ext" <<_ACEOF
6393 #line 6393 "configure"
6394 #include "confdefs.h"
6395
6396 /* Override any gcc2 internal prototype to avoid an error.  */
6397 #ifdef __cplusplus
6398 extern "C"
6399 #endif
6400 /* We use char because int might match the return type of a gcc2
6401    builtin and then its argument prototype would still apply.  */
6402 char dnet_ntoa ();
6403 int
6404 main (void)
6405 {
6406 dnet_ntoa ();
6407   ;
6408   return 0;
6409 }
6410 _ACEOF
6411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6412 if { (eval echo "$as_me:6412: \"$ac_link\"") >&5
6413   (eval $ac_link) 2>&5
6414   ac_status=$?
6415   echo "$as_me:6415: \$? = $ac_status" >&5
6416   (exit "$ac_status"); } &&
6417          { ac_try='test -s "conftest$ac_exeext"'
6418   { (eval echo "$as_me:6418: \"$ac_try\"") >&5
6419   (eval $ac_try) 2>&5
6420   ac_status=$?
6421   echo "$as_me:6421: \$? = $ac_status" >&5
6422   (exit "$ac_status"); }; }; then
6423   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6424 else
6425   echo "$as_me: failed program was:" >&5
6426 cat "conftest.$ac_ext" >&5
6427 ac_cv_lib_dnet_stub_dnet_ntoa=no
6428 fi
6429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6430 LIBS=$ac_check_lib_save_LIBS
6431 fi
6432 echo "$as_me:6432: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6433 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6434 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
6435   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6436 fi
6437
6438     fi
6439 fi
6440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6441     LIBS="$ac_xsave_LIBS"
6442
6443     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6444     # to get the SysV transport functions.
6445     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6446     # needs -lnsl.
6447     # The nsl library prevents programs from opening the X display
6448     # on Irix 5.2, according to T.E. Dickey.
6449     # The functions gethostbyname, getservbyname, and inet_addr are
6450     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6451     echo "$as_me:6451: checking for gethostbyname" >&5
6452 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6453 if test "${ac_cv_func_gethostbyname+set}" = set; then
6454   echo $ECHO_N "(cached) $ECHO_C" >&6
6455 else
6456   cat >"conftest.$ac_ext" <<_ACEOF
6457 #line 6457 "configure"
6458 #include "confdefs.h"
6459 #define gethostbyname autoconf_temporary
6460 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6461 #undef gethostbyname
6462
6463 #ifdef __cplusplus
6464 extern "C"
6465 #endif
6466
6467 /* We use char because int might match the return type of a gcc2
6468    builtin and then its argument prototype would still apply.  */
6469 char gethostbyname (void);
6470
6471 int
6472 main (void)
6473 {
6474
6475 /* The GNU C library defines stubs for functions which it implements
6476     to always fail with ENOSYS.  Some functions are actually named
6477     something starting with __ and the normal name is an alias.  */
6478 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6479 #error found stub for gethostbyname
6480 #endif
6481
6482         return gethostbyname ();
6483   ;
6484   return 0;
6485 }
6486 _ACEOF
6487 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6488 if { (eval echo "$as_me:6488: \"$ac_link\"") >&5
6489   (eval $ac_link) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit "$ac_status"); } &&
6493          { ac_try='test -s "conftest$ac_exeext"'
6494   { (eval echo "$as_me:6494: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:6497: \$? = $ac_status" >&5
6498   (exit "$ac_status"); }; }; then
6499   ac_cv_func_gethostbyname=yes
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 cat "conftest.$ac_ext" >&5
6503 ac_cv_func_gethostbyname=no
6504 fi
6505 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6506 fi
6507 echo "$as_me:6507: result: $ac_cv_func_gethostbyname" >&5
6508 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6509
6510     if test $ac_cv_func_gethostbyname = no; then
6511       echo "$as_me:6511: checking for gethostbyname in -lnsl" >&5
6512 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6513 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6514   echo $ECHO_N "(cached) $ECHO_C" >&6
6515 else
6516   ac_check_lib_save_LIBS=$LIBS
6517 LIBS="-lnsl  $LIBS"
6518 cat >"conftest.$ac_ext" <<_ACEOF
6519 #line 6519 "configure"
6520 #include "confdefs.h"
6521
6522 /* Override any gcc2 internal prototype to avoid an error.  */
6523 #ifdef __cplusplus
6524 extern "C"
6525 #endif
6526 /* We use char because int might match the return type of a gcc2
6527    builtin and then its argument prototype would still apply.  */
6528 char gethostbyname ();
6529 int
6530 main (void)
6531 {
6532 gethostbyname ();
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6538 if { (eval echo "$as_me:6538: \"$ac_link\"") >&5
6539   (eval $ac_link) 2>&5
6540   ac_status=$?
6541   echo "$as_me:6541: \$? = $ac_status" >&5
6542   (exit "$ac_status"); } &&
6543          { ac_try='test -s "conftest$ac_exeext"'
6544   { (eval echo "$as_me:6544: \"$ac_try\"") >&5
6545   (eval $ac_try) 2>&5
6546   ac_status=$?
6547   echo "$as_me:6547: \$? = $ac_status" >&5
6548   (exit "$ac_status"); }; }; then
6549   ac_cv_lib_nsl_gethostbyname=yes
6550 else
6551   echo "$as_me: failed program was:" >&5
6552 cat "conftest.$ac_ext" >&5
6553 ac_cv_lib_nsl_gethostbyname=no
6554 fi
6555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6556 LIBS=$ac_check_lib_save_LIBS
6557 fi
6558 echo "$as_me:6558: result: $ac_cv_lib_nsl_gethostbyname" >&5
6559 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6560 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
6561   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6562 fi
6563
6564       if test $ac_cv_lib_nsl_gethostbyname = no; then
6565         echo "$as_me:6565: checking for gethostbyname in -lbsd" >&5
6566 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6567 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6568   echo $ECHO_N "(cached) $ECHO_C" >&6
6569 else
6570   ac_check_lib_save_LIBS=$LIBS
6571 LIBS="-lbsd  $LIBS"
6572 cat >"conftest.$ac_ext" <<_ACEOF
6573 #line 6573 "configure"
6574 #include "confdefs.h"
6575
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 #ifdef __cplusplus
6578 extern "C"
6579 #endif
6580 /* We use char because int might match the return type of a gcc2
6581    builtin and then its argument prototype would still apply.  */
6582 char gethostbyname ();
6583 int
6584 main (void)
6585 {
6586 gethostbyname ();
6587   ;
6588   return 0;
6589 }
6590 _ACEOF
6591 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6592 if { (eval echo "$as_me:6592: \"$ac_link\"") >&5
6593   (eval $ac_link) 2>&5
6594   ac_status=$?
6595   echo "$as_me:6595: \$? = $ac_status" >&5
6596   (exit "$ac_status"); } &&
6597          { ac_try='test -s "conftest$ac_exeext"'
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_lib_bsd_gethostbyname=yes
6604 else
6605   echo "$as_me: failed program was:" >&5
6606 cat "conftest.$ac_ext" >&5
6607 ac_cv_lib_bsd_gethostbyname=no
6608 fi
6609 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6610 LIBS=$ac_check_lib_save_LIBS
6611 fi
6612 echo "$as_me:6612: result: $ac_cv_lib_bsd_gethostbyname" >&5
6613 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6614 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
6615   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6616 fi
6617
6618       fi
6619     fi
6620
6621     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6622     # socket/setsockopt and other routines are undefined under SCO ODT
6623     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6624     # on later versions), says Simon Leinen: it contains gethostby*
6625     # variants that don't use the nameserver (or something).  -lsocket
6626     # must be given before -lnsl if both are needed.  We assume that
6627     # if connect needs -lnsl, so does gethostbyname.
6628     echo "$as_me:6628: checking for connect" >&5
6629 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6630 if test "${ac_cv_func_connect+set}" = set; then
6631   echo $ECHO_N "(cached) $ECHO_C" >&6
6632 else
6633   cat >"conftest.$ac_ext" <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636 #define connect autoconf_temporary
6637 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6638 #undef connect
6639
6640 #ifdef __cplusplus
6641 extern "C"
6642 #endif
6643
6644 /* We use char because int might match the return type of a gcc2
6645    builtin and then its argument prototype would still apply.  */
6646 char connect (void);
6647
6648 int
6649 main (void)
6650 {
6651
6652 /* The GNU C library defines stubs for functions which it implements
6653     to always fail with ENOSYS.  Some functions are actually named
6654     something starting with __ and the normal name is an alias.  */
6655 #if defined (__stub_connect) || defined (__stub___connect)
6656 #error found stub for connect
6657 #endif
6658
6659         return connect ();
6660   ;
6661   return 0;
6662 }
6663 _ACEOF
6664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6665 if { (eval echo "$as_me:6665: \"$ac_link\"") >&5
6666   (eval $ac_link) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit "$ac_status"); } &&
6670          { ac_try='test -s "conftest$ac_exeext"'
6671   { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit "$ac_status"); }; }; then
6676   ac_cv_func_connect=yes
6677 else
6678   echo "$as_me: failed program was:" >&5
6679 cat "conftest.$ac_ext" >&5
6680 ac_cv_func_connect=no
6681 fi
6682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6683 fi
6684 echo "$as_me:6684: result: $ac_cv_func_connect" >&5
6685 echo "${ECHO_T}$ac_cv_func_connect" >&6
6686
6687     if test $ac_cv_func_connect = no; then
6688       echo "$as_me:6688: checking for connect in -lsocket" >&5
6689 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6690 if test "${ac_cv_lib_socket_connect+set}" = set; then
6691   echo $ECHO_N "(cached) $ECHO_C" >&6
6692 else
6693   ac_check_lib_save_LIBS=$LIBS
6694 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6695 cat >"conftest.$ac_ext" <<_ACEOF
6696 #line 6696 "configure"
6697 #include "confdefs.h"
6698
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 #ifdef __cplusplus
6701 extern "C"
6702 #endif
6703 /* We use char because int might match the return type of a gcc2
6704    builtin and then its argument prototype would still apply.  */
6705 char connect ();
6706 int
6707 main (void)
6708 {
6709 connect ();
6710   ;
6711   return 0;
6712 }
6713 _ACEOF
6714 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6715 if { (eval echo "$as_me:6715: \"$ac_link\"") >&5
6716   (eval $ac_link) 2>&5
6717   ac_status=$?
6718   echo "$as_me:6718: \$? = $ac_status" >&5
6719   (exit "$ac_status"); } &&
6720          { ac_try='test -s "conftest$ac_exeext"'
6721   { (eval echo "$as_me:6721: \"$ac_try\"") >&5
6722   (eval $ac_try) 2>&5
6723   ac_status=$?
6724   echo "$as_me:6724: \$? = $ac_status" >&5
6725   (exit "$ac_status"); }; }; then
6726   ac_cv_lib_socket_connect=yes
6727 else
6728   echo "$as_me: failed program was:" >&5
6729 cat "conftest.$ac_ext" >&5
6730 ac_cv_lib_socket_connect=no
6731 fi
6732 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6733 LIBS=$ac_check_lib_save_LIBS
6734 fi
6735 echo "$as_me:6735: result: $ac_cv_lib_socket_connect" >&5
6736 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6737 if test "$ac_cv_lib_socket_connect" = yes; then
6738   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6739 fi
6740
6741     fi
6742
6743     # Guillermo Gomez says -lposix is necessary on A/UX.
6744     echo "$as_me:6744: checking for remove" >&5
6745 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6746 if test "${ac_cv_func_remove+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749   cat >"conftest.$ac_ext" <<_ACEOF
6750 #line 6750 "configure"
6751 #include "confdefs.h"
6752 #define remove autoconf_temporary
6753 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6754 #undef remove
6755
6756 #ifdef __cplusplus
6757 extern "C"
6758 #endif
6759
6760 /* We use char because int might match the return type of a gcc2
6761    builtin and then its argument prototype would still apply.  */
6762 char remove (void);
6763
6764 int
6765 main (void)
6766 {
6767
6768 /* The GNU C library defines stubs for functions which it implements
6769     to always fail with ENOSYS.  Some functions are actually named
6770     something starting with __ and the normal name is an alias.  */
6771 #if defined (__stub_remove) || defined (__stub___remove)
6772 #error found stub for remove
6773 #endif
6774
6775         return remove ();
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6781 if { (eval echo "$as_me:6781: \"$ac_link\"") >&5
6782   (eval $ac_link) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit "$ac_status"); } &&
6786          { ac_try='test -s "conftest$ac_exeext"'
6787   { (eval echo "$as_me:6787: \"$ac_try\"") >&5
6788   (eval $ac_try) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit "$ac_status"); }; }; then
6792   ac_cv_func_remove=yes
6793 else
6794   echo "$as_me: failed program was:" >&5
6795 cat "conftest.$ac_ext" >&5
6796 ac_cv_func_remove=no
6797 fi
6798 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6799 fi
6800 echo "$as_me:6800: result: $ac_cv_func_remove" >&5
6801 echo "${ECHO_T}$ac_cv_func_remove" >&6
6802
6803     if test $ac_cv_func_remove = no; then
6804       echo "$as_me:6804: checking for remove in -lposix" >&5
6805 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6806 if test "${ac_cv_lib_posix_remove+set}" = set; then
6807   echo $ECHO_N "(cached) $ECHO_C" >&6
6808 else
6809   ac_check_lib_save_LIBS=$LIBS
6810 LIBS="-lposix  $LIBS"
6811 cat >"conftest.$ac_ext" <<_ACEOF
6812 #line 6812 "configure"
6813 #include "confdefs.h"
6814
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 #ifdef __cplusplus
6817 extern "C"
6818 #endif
6819 /* We use char because int might match the return type of a gcc2
6820    builtin and then its argument prototype would still apply.  */
6821 char remove ();
6822 int
6823 main (void)
6824 {
6825 remove ();
6826   ;
6827   return 0;
6828 }
6829 _ACEOF
6830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6831 if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
6832   (eval $ac_link) 2>&5
6833   ac_status=$?
6834   echo "$as_me:6834: \$? = $ac_status" >&5
6835   (exit "$ac_status"); } &&
6836          { ac_try='test -s "conftest$ac_exeext"'
6837   { (eval echo "$as_me:6837: \"$ac_try\"") >&5
6838   (eval $ac_try) 2>&5
6839   ac_status=$?
6840   echo "$as_me:6840: \$? = $ac_status" >&5
6841   (exit "$ac_status"); }; }; then
6842   ac_cv_lib_posix_remove=yes
6843 else
6844   echo "$as_me: failed program was:" >&5
6845 cat "conftest.$ac_ext" >&5
6846 ac_cv_lib_posix_remove=no
6847 fi
6848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6849 LIBS=$ac_check_lib_save_LIBS
6850 fi
6851 echo "$as_me:6851: result: $ac_cv_lib_posix_remove" >&5
6852 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6853 if test "$ac_cv_lib_posix_remove" = yes; then
6854   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6855 fi
6856
6857     fi
6858
6859     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6860     echo "$as_me:6860: checking for shmat" >&5
6861 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6862 if test "${ac_cv_func_shmat+set}" = set; then
6863   echo $ECHO_N "(cached) $ECHO_C" >&6
6864 else
6865   cat >"conftest.$ac_ext" <<_ACEOF
6866 #line 6866 "configure"
6867 #include "confdefs.h"
6868 #define shmat autoconf_temporary
6869 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6870 #undef shmat
6871
6872 #ifdef __cplusplus
6873 extern "C"
6874 #endif
6875
6876 /* We use char because int might match the return type of a gcc2
6877    builtin and then its argument prototype would still apply.  */
6878 char shmat (void);
6879
6880 int
6881 main (void)
6882 {
6883
6884 /* The GNU C library defines stubs for functions which it implements
6885     to always fail with ENOSYS.  Some functions are actually named
6886     something starting with __ and the normal name is an alias.  */
6887 #if defined (__stub_shmat) || defined (__stub___shmat)
6888 #error found stub for shmat
6889 #endif
6890
6891         return shmat ();
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit "$ac_status"); } &&
6902          { ac_try='test -s "conftest$ac_exeext"'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit "$ac_status"); }; }; then
6908   ac_cv_func_shmat=yes
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat "conftest.$ac_ext" >&5
6912 ac_cv_func_shmat=no
6913 fi
6914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6915 fi
6916 echo "$as_me:6916: result: $ac_cv_func_shmat" >&5
6917 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6918
6919     if test $ac_cv_func_shmat = no; then
6920       echo "$as_me:6920: checking for shmat in -lipc" >&5
6921 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6922 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6923   echo $ECHO_N "(cached) $ECHO_C" >&6
6924 else
6925   ac_check_lib_save_LIBS=$LIBS
6926 LIBS="-lipc  $LIBS"
6927 cat >"conftest.$ac_ext" <<_ACEOF
6928 #line 6928 "configure"
6929 #include "confdefs.h"
6930
6931 /* Override any gcc2 internal prototype to avoid an error.  */
6932 #ifdef __cplusplus
6933 extern "C"
6934 #endif
6935 /* We use char because int might match the return type of a gcc2
6936    builtin and then its argument prototype would still apply.  */
6937 char shmat ();
6938 int
6939 main (void)
6940 {
6941 shmat ();
6942   ;
6943   return 0;
6944 }
6945 _ACEOF
6946 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6947 if { (eval echo "$as_me:6947: \"$ac_link\"") >&5
6948   (eval $ac_link) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit "$ac_status"); } &&
6952          { ac_try='test -s "conftest$ac_exeext"'
6953   { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit "$ac_status"); }; }; then
6958   ac_cv_lib_ipc_shmat=yes
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 cat "conftest.$ac_ext" >&5
6962 ac_cv_lib_ipc_shmat=no
6963 fi
6964 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6965 LIBS=$ac_check_lib_save_LIBS
6966 fi
6967 echo "$as_me:6967: result: $ac_cv_lib_ipc_shmat" >&5
6968 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6969 if test "$ac_cv_lib_ipc_shmat" = yes; then
6970   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6971 fi
6972
6973     fi
6974   fi
6975
6976   # Check for libraries that X11R6 Xt/Xaw programs need.
6977   ac_save_LDFLAGS=$LDFLAGS
6978   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6979   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6980   # check for ICE first), but we must link in the order -lSM -lICE or
6981   # we get undefined symbols.  So assume we have SM if we have ICE.
6982   # These have to be linked with before -lX11, unlike the other
6983   # libraries we check for below, so use a different variable.
6984   # John Interrante, Karl Berry
6985   echo "$as_me:6985: checking for IceConnectionNumber in -lICE" >&5
6986 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6987 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6988   echo $ECHO_N "(cached) $ECHO_C" >&6
6989 else
6990   ac_check_lib_save_LIBS=$LIBS
6991 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6992 cat >"conftest.$ac_ext" <<_ACEOF
6993 #line 6993 "configure"
6994 #include "confdefs.h"
6995
6996 /* Override any gcc2 internal prototype to avoid an error.  */
6997 #ifdef __cplusplus
6998 extern "C"
6999 #endif
7000 /* We use char because int might match the return type of a gcc2
7001    builtin and then its argument prototype would still apply.  */
7002 char IceConnectionNumber ();
7003 int
7004 main (void)
7005 {
7006 IceConnectionNumber ();
7007   ;
7008   return 0;
7009 }
7010 _ACEOF
7011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7012 if { (eval echo "$as_me:7012: \"$ac_link\"") >&5
7013   (eval $ac_link) 2>&5
7014   ac_status=$?
7015   echo "$as_me:7015: \$? = $ac_status" >&5
7016   (exit "$ac_status"); } &&
7017          { ac_try='test -s "conftest$ac_exeext"'
7018   { (eval echo "$as_me:7018: \"$ac_try\"") >&5
7019   (eval $ac_try) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit "$ac_status"); }; }; then
7023   ac_cv_lib_ICE_IceConnectionNumber=yes
7024 else
7025   echo "$as_me: failed program was:" >&5
7026 cat "conftest.$ac_ext" >&5
7027 ac_cv_lib_ICE_IceConnectionNumber=no
7028 fi
7029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7030 LIBS=$ac_check_lib_save_LIBS
7031 fi
7032 echo "$as_me:7032: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7033 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
7034 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
7035   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7036 fi
7037
7038   LDFLAGS=$ac_save_LDFLAGS
7039
7040 fi
7041
7042 fi
7043
7044 if test "$GCC" = yes || test "$GXX" = yes
7045 then
7046
7047 if test "$GCC" = yes || test "$GXX" = yes
7048 then
7049         case $CFLAGS in
7050         (*-Werror=*)
7051                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
7052
7053 echo "${as_me:-configure}:7053: testing repairing CFLAGS: $CFLAGS ..." 1>&5
7054
7055                 cf_temp_flags=
7056                 for cf_temp_scan in $CFLAGS
7057                 do
7058                         case "x$cf_temp_scan" in
7059                         (x-Werror=*)
7060
7061         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7062         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7063
7064                                 ;;
7065                         (*)
7066
7067         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7068         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7069
7070                                 ;;
7071                         esac
7072                 done
7073                 CFLAGS="$cf_temp_flags"
7074                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
7075
7076 echo "${as_me:-configure}:7076: testing ... fixed $CFLAGS ..." 1>&5
7077
7078                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
7079
7080 echo "${as_me:-configure}:7080: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7081
7082                 ;;
7083         esac
7084 fi
7085
7086 if test "$GCC" = yes || test "$GXX" = yes
7087 then
7088         case $CPPFLAGS in
7089         (*-Werror=*)
7090                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
7091
7092 echo "${as_me:-configure}:7092: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
7093
7094                 cf_temp_flags=
7095                 for cf_temp_scan in $CPPFLAGS
7096                 do
7097                         case "x$cf_temp_scan" in
7098                         (x-Werror=*)
7099
7100         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7101         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7102
7103                                 ;;
7104                         (*)
7105
7106         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7107         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7108
7109                                 ;;
7110                         esac
7111                 done
7112                 CPPFLAGS="$cf_temp_flags"
7113                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
7114
7115 echo "${as_me:-configure}:7115: testing ... fixed $CPPFLAGS ..." 1>&5
7116
7117                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
7118
7119 echo "${as_me:-configure}:7119: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7120
7121                 ;;
7122         esac
7123 fi
7124
7125 if test "$GCC" = yes || test "$GXX" = yes
7126 then
7127         case $LDFLAGS in
7128         (*-Werror=*)
7129                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
7130
7131 echo "${as_me:-configure}:7131: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
7132
7133                 cf_temp_flags=
7134                 for cf_temp_scan in $LDFLAGS
7135                 do
7136                         case "x$cf_temp_scan" in
7137                         (x-Werror=*)
7138
7139         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7140         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7141
7142                                 ;;
7143                         (*)
7144
7145         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7146         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7147
7148                                 ;;
7149                         esac
7150                 done
7151                 LDFLAGS="$cf_temp_flags"
7152                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
7153
7154 echo "${as_me:-configure}:7154: testing ... fixed $LDFLAGS ..." 1>&5
7155
7156                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
7157
7158 echo "${as_me:-configure}:7158: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7159
7160                 ;;
7161         esac
7162 fi
7163
7164 echo "$as_me:7164: checking if you want to turn on gcc warnings" >&5
7165 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
7166
7167 # Check whether --enable-warnings or --disable-warnings was given.
7168 if test "${enable_warnings+set}" = set; then
7169   enableval="$enable_warnings"
7170   test "$enableval" != yes && enableval=no
7171         if test "$enableval" != "no" ; then
7172     enable_warnings=yes
7173         else
7174                 enable_warnings=no
7175         fi
7176 else
7177   enableval=no
7178         enable_warnings=no
7179
7180 fi;
7181 echo "$as_me:7181: result: $enable_warnings" >&5
7182 echo "${ECHO_T}$enable_warnings" >&6
7183 if test "$enable_warnings" = "yes"
7184 then
7185
7186 if test "x$have_x" = xyes; then
7187
7188 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
7189 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
7190 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
7191 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
7192 for cf_X_CFLAGS in $X_CFLAGS
7193 do
7194         case "x$cf_X_CFLAGS" in
7195         x-[IUD]*)
7196                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
7197                 ;;
7198         *)
7199                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
7200                 ;;
7201         esac
7202 done
7203
7204 cat >"conftest.$ac_ext" <<_ACEOF
7205 #line 7205 "configure"
7206 #include "confdefs.h"
7207
7208 #include <stdlib.h>
7209 #include <X11/Intrinsic.h>
7210
7211 int
7212 main (void)
7213 {
7214 String foo = malloc(1); (void)foo
7215   ;
7216   return 0;
7217 }
7218 _ACEOF
7219 rm -f "conftest.$ac_objext"
7220 if { (eval echo "$as_me:7220: \"$ac_compile\"") >&5
7221   (eval $ac_compile) 2>&5
7222   ac_status=$?
7223   echo "$as_me:7223: \$? = $ac_status" >&5
7224   (exit "$ac_status"); } &&
7225          { ac_try='test -s "conftest.$ac_objext"'
7226   { (eval echo "$as_me:7226: \"$ac_try\"") >&5
7227   (eval $ac_try) 2>&5
7228   ac_status=$?
7229   echo "$as_me:7229: \$? = $ac_status" >&5
7230   (exit "$ac_status"); }; }; then
7231
7232 echo "$as_me:7232: checking for X11/Xt const-feature" >&5
7233 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
7234 if test "${cf_cv_const_x_string+set}" = set; then
7235   echo $ECHO_N "(cached) $ECHO_C" >&6
7236 else
7237
7238         cat >"conftest.$ac_ext" <<_ACEOF
7239 #line 7239 "configure"
7240 #include "confdefs.h"
7241
7242 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
7243 #undef  XTSTRINGDEFINES /* X11R5 and later */
7244 #include <stdlib.h>
7245 #include <X11/Intrinsic.h>
7246
7247 int
7248 main (void)
7249 {
7250 String foo = malloc(1); *foo = 0
7251   ;
7252   return 0;
7253 }
7254 _ACEOF
7255 rm -f "conftest.$ac_objext"
7256 if { (eval echo "$as_me:7256: \"$ac_compile\"") >&5
7257   (eval $ac_compile) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit "$ac_status"); } &&
7261          { ac_try='test -s "conftest.$ac_objext"'
7262   { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263   (eval $ac_try) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit "$ac_status"); }; }; then
7267
7268                         cf_cv_const_x_string=no
7269
7270 else
7271   echo "$as_me: failed program was:" >&5
7272 cat "conftest.$ac_ext" >&5
7273
7274                         cf_cv_const_x_string=yes
7275
7276 fi
7277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7278
7279 fi
7280 echo "$as_me:7280: result: $cf_cv_const_x_string" >&5
7281 echo "${ECHO_T}$cf_cv_const_x_string" >&6
7282
7283 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
7284 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
7285 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
7286
7287 case "$cf_cv_const_x_string" in
7288 (no)
7289
7290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7291         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
7292
7293         ;;
7294 (*)
7295
7296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7297         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
7298
7299         ;;
7300 esac
7301
7302 else
7303   echo "$as_me: failed program was:" >&5
7304 cat "conftest.$ac_ext" >&5
7305 fi
7306 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7307  fi
7308 cat > "conftest.$ac_ext" <<EOF
7309 #line 7309 "${as_me:-configure}"
7310 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
7311 EOF
7312 if test "$INTEL_COMPILER" = yes
7313 then
7314 # The "-wdXXX" options suppress warnings:
7315 # remark #1419: external declaration in primary source file
7316 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
7317 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
7318 # remark #193: zero used for undefined preprocessing identifier
7319 # remark #593: variable "curs_sb_left_arrow" was set but never used
7320 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
7321 # remark #869: parameter "tw" was never referenced
7322 # remark #981: operands are evaluated in unspecified order
7323 # warning #279: controlling expression is constant
7324
7325         { echo "$as_me:7325: checking for $CC warning options..." >&5
7326 echo "$as_me: checking for $CC warning options..." >&6;}
7327         cf_save_CFLAGS="$CFLAGS"
7328         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
7329         for cf_opt in \
7330                 wd1419 \
7331                 wd1683 \
7332                 wd1684 \
7333                 wd193 \
7334                 wd593 \
7335                 wd279 \
7336                 wd810 \
7337                 wd869 \
7338                 wd981
7339         do
7340                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7341                 if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5
7342   (eval $ac_compile) 2>&5
7343   ac_status=$?
7344   echo "$as_me:7344: \$? = $ac_status" >&5
7345   (exit "$ac_status"); }; then
7346                         test -n "$verbose" && echo "$as_me:7346: result: ... -$cf_opt" >&5
7347 echo "${ECHO_T}... -$cf_opt" >&6
7348                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7349                 fi
7350         done
7351         CFLAGS="$cf_save_CFLAGS"
7352 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
7353 then
7354         { echo "$as_me:7354: checking for $CC warning options..." >&5
7355 echo "$as_me: checking for $CC warning options..." >&6;}
7356         cf_save_CFLAGS="$CFLAGS"
7357         cf_warn_CONST=""
7358         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
7359         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
7360         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
7361         for cf_opt in W Wall \
7362                 Wbad-function-cast \
7363                 Wcast-align \
7364                 Wcast-qual \
7365                 Wdeclaration-after-statement \
7366                 Wextra \
7367                 Winline \
7368                 Wmissing-declarations \
7369                 Wmissing-prototypes \
7370                 Wnested-externs \
7371                 Wpointer-arith \
7372                 Wshadow \
7373                 Wstrict-prototypes \
7374                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
7375         do
7376                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7377                 if { (eval echo "$as_me:7377: \"$ac_compile\"") >&5
7378   (eval $ac_compile) 2>&5
7379   ac_status=$?
7380   echo "$as_me:7380: \$? = $ac_status" >&5
7381   (exit "$ac_status"); }; then
7382                         test -n "$verbose" && echo "$as_me:7382: result: ... -$cf_opt" >&5
7383 echo "${ECHO_T}... -$cf_opt" >&6
7384                         case "$cf_opt" in
7385                         (Winline)
7386                                 case "$GCC_VERSION" in
7387                                 ([34].*)
7388                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
7389
7390 echo "${as_me:-configure}:7390: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7391
7392                                         continue;;
7393                                 esac
7394                                 ;;
7395                         (Wpointer-arith)
7396                                 case "$GCC_VERSION" in
7397                                 ([12].*)
7398                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
7399
7400 echo "${as_me:-configure}:7400: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7401
7402                                         continue;;
7403                                 esac
7404                                 ;;
7405                         esac
7406                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7407                 fi
7408         done
7409         CFLAGS="$cf_save_CFLAGS"
7410 fi
7411 rm -rf ./conftest*
7412
7413 fi
7414
7415 if test "$GCC" = yes || test "$GXX" = yes
7416 then
7417 cat > conftest.i <<EOF
7418 #ifndef GCC_PRINTF
7419 #define GCC_PRINTF 0
7420 #endif
7421 #ifndef GCC_SCANF
7422 #define GCC_SCANF 0
7423 #endif
7424 #ifndef GCC_NORETURN
7425 #define GCC_NORETURN /* nothing */
7426 #endif
7427 #ifndef GCC_UNUSED
7428 #define GCC_UNUSED /* nothing */
7429 #endif
7430 EOF
7431 if test "$GCC" = yes
7432 then
7433         { echo "$as_me:7433: checking for $CC __attribute__ directives..." >&5
7434 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
7435 cat > "conftest.$ac_ext" <<EOF
7436 #line 7436 "${as_me:-configure}"
7437 #include "confdefs.h"
7438 #include "conftest.h"
7439 #include "conftest.i"
7440 #if     GCC_PRINTF
7441 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
7442 #else
7443 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
7444 #endif
7445 #if     GCC_SCANF
7446 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
7447 #else
7448 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
7449 #endif
7450 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
7451 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
7452 extern void foo(void) GCC_NORETURN;
7453 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
7454 EOF
7455         cf_printf_attribute=no
7456         cf_scanf_attribute=no
7457         for cf_attribute in scanf printf unused noreturn
7458         do
7459
7460 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7461
7462                 cf_directive="__attribute__(($cf_attribute))"
7463                 echo "checking for $CC $cf_directive" 1>&5
7464
7465                 case "$cf_attribute" in
7466                 (printf)
7467                         cf_printf_attribute=yes
7468                         cat >conftest.h <<EOF
7469 #define GCC_$cf_ATTRIBUTE 1
7470 EOF
7471                         ;;
7472                 (scanf)
7473                         cf_scanf_attribute=yes
7474                         cat >conftest.h <<EOF
7475 #define GCC_$cf_ATTRIBUTE 1
7476 EOF
7477                         ;;
7478                 (*)
7479                         cat >conftest.h <<EOF
7480 #define GCC_$cf_ATTRIBUTE $cf_directive
7481 EOF
7482                         ;;
7483                 esac
7484
7485                 if { (eval echo "$as_me:7485: \"$ac_compile\"") >&5
7486   (eval $ac_compile) 2>&5
7487   ac_status=$?
7488   echo "$as_me:7488: \$? = $ac_status" >&5
7489   (exit "$ac_status"); }; then
7490                         test -n "$verbose" && echo "$as_me:7490: result: ... $cf_attribute" >&5
7491 echo "${ECHO_T}... $cf_attribute" >&6
7492                         cat conftest.h >>confdefs.h
7493                         case "$cf_attribute" in
7494                         (noreturn)
7495
7496 cat >>confdefs.h <<EOF
7497 #define GCC_NORETURN $cf_directive
7498 EOF
7499
7500                                 ;;
7501                         (printf)
7502                                 cf_value='/* nothing */'
7503                                 if test "$cf_printf_attribute" != no ; then
7504                                         cf_value='__attribute__((format(printf,fmt,var)))'
7505
7506 cat >>confdefs.h <<\EOF
7507 #define GCC_PRINTF 1
7508 EOF
7509
7510                                 fi
7511
7512 cat >>confdefs.h <<EOF
7513 #define GCC_PRINTFLIKE(fmt,var) $cf_value
7514 EOF
7515
7516                                 ;;
7517                         (scanf)
7518                                 cf_value='/* nothing */'
7519                                 if test "$cf_scanf_attribute" != no ; then
7520                                         cf_value='__attribute__((format(scanf,fmt,var)))'
7521
7522 cat >>confdefs.h <<\EOF
7523 #define GCC_SCANF 1
7524 EOF
7525
7526                                 fi
7527
7528 cat >>confdefs.h <<EOF
7529 #define GCC_SCANFLIKE(fmt,var) $cf_value
7530 EOF
7531
7532                                 ;;
7533                         (unused)
7534
7535 cat >>confdefs.h <<EOF
7536 #define GCC_UNUSED $cf_directive
7537 EOF
7538
7539                                 ;;
7540                         esac
7541                 fi
7542         done
7543 else
7544         ${FGREP-fgrep} define conftest.i >>confdefs.h
7545 fi
7546 rm -rf ./conftest*
7547 fi
7548
7549 fi
7550
7551 echo "$as_me:7551: checking if you want to use pkg-config" >&5
7552 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
7553
7554 # Check whether --with-pkg-config or --without-pkg-config was given.
7555 if test "${with_pkg_config+set}" = set; then
7556   withval="$with_pkg_config"
7557   cf_pkg_config=$withval
7558 else
7559   cf_pkg_config=yes
7560 fi;
7561 echo "$as_me:7561: result: $cf_pkg_config" >&5
7562 echo "${ECHO_T}$cf_pkg_config" >&6
7563
7564 case "$cf_pkg_config" in
7565 (no)
7566         PKG_CONFIG=none
7567         ;;
7568 (yes)
7569
7570 if test -n "$ac_tool_prefix"; then
7571   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7572 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7573 echo "$as_me:7573: checking for $ac_word" >&5
7574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7575 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7576   echo $ECHO_N "(cached) $ECHO_C" >&6
7577 else
7578   case $PKG_CONFIG in
7579   [\\/]* | ?:[\\/]*)
7580   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7581   ;;
7582   *)
7583   ac_save_IFS=$IFS; IFS=$ac_path_separator
7584 ac_dummy="$PATH"
7585 for ac_dir in $ac_dummy; do
7586   IFS=$ac_save_IFS
7587   test -z "$ac_dir" && ac_dir=.
7588   if $as_executable_p "$ac_dir/$ac_word"; then
7589    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
7590    echo "$as_me:7590: found $ac_dir/$ac_word" >&5
7591    break
7592 fi
7593 done
7594
7595   ;;
7596 esac
7597 fi
7598 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7599
7600 if test -n "$PKG_CONFIG"; then
7601   echo "$as_me:7601: result: $PKG_CONFIG" >&5
7602 echo "${ECHO_T}$PKG_CONFIG" >&6
7603 else
7604   echo "$as_me:7604: result: no" >&5
7605 echo "${ECHO_T}no" >&6
7606 fi
7607
7608 fi
7609 if test -z "$ac_cv_path_PKG_CONFIG"; then
7610   ac_pt_PKG_CONFIG=$PKG_CONFIG
7611   # Extract the first word of "pkg-config", so it can be a program name with args.
7612 set dummy pkg-config; ac_word=$2
7613 echo "$as_me:7613: checking for $ac_word" >&5
7614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7615 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
7616   echo $ECHO_N "(cached) $ECHO_C" >&6
7617 else
7618   case $ac_pt_PKG_CONFIG in
7619   [\\/]* | ?:[\\/]*)
7620   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7621   ;;
7622   *)
7623   ac_save_IFS=$IFS; IFS=$ac_path_separator
7624 ac_dummy="$PATH"
7625 for ac_dir in $ac_dummy; do
7626   IFS=$ac_save_IFS
7627   test -z "$ac_dir" && ac_dir=.
7628   if $as_executable_p "$ac_dir/$ac_word"; then
7629    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
7630    echo "$as_me:7630: found $ac_dir/$ac_word" >&5
7631    break
7632 fi
7633 done
7634
7635   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
7636   ;;
7637 esac
7638 fi
7639 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7640
7641 if test -n "$ac_pt_PKG_CONFIG"; then
7642   echo "$as_me:7642: result: $ac_pt_PKG_CONFIG" >&5
7643 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
7644 else
7645   echo "$as_me:7645: result: no" >&5
7646 echo "${ECHO_T}no" >&6
7647 fi
7648
7649   PKG_CONFIG=$ac_pt_PKG_CONFIG
7650 else
7651   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7652 fi
7653
7654         ;;
7655 (*)
7656         PKG_CONFIG=$withval
7657         ;;
7658 esac
7659
7660 test -z "$PKG_CONFIG" && PKG_CONFIG=none
7661 if test "$PKG_CONFIG" != none ; then
7662
7663 if test "x$prefix" != xNONE; then
7664         cf_path_syntax="$prefix"
7665 else
7666         cf_path_syntax="$ac_default_prefix"
7667 fi
7668
7669 case ".$PKG_CONFIG" in
7670 (.\$\(*\)*|.\'*\'*)
7671         ;;
7672 (..|./*|.\\*)
7673         ;;
7674 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7675         ;;
7676 (.\$\{*prefix\}*|.\$\{*dir\}*)
7677         eval PKG_CONFIG="$PKG_CONFIG"
7678         case ".$PKG_CONFIG" in
7679         (.NONE/*)
7680                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
7681                 ;;
7682         esac
7683         ;;
7684 (.no|.NONE/*)
7685         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
7686         ;;
7687 (*)
7688         { { echo "$as_me:7688: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
7689 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
7690    { (exit 1); exit 1; }; }
7691         ;;
7692 esac
7693
7694 elif test "x$cf_pkg_config" != xno ; then
7695         { echo "$as_me:7695: WARNING: pkg-config is not installed" >&5
7696 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
7697 fi
7698
7699 echo "$as_me:7699: checking for this package's name" >&5
7700 echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
7701
7702 # Check whether --with-package or --without-package was given.
7703 if test "${with_package+set}" = set; then
7704   withval="$with_package"
7705   PACKAGE=$withval
7706 else
7707   PACKAGE=dialog
7708 fi;
7709 echo "$as_me:7709: result: $PACKAGE" >&5
7710 echo "${ECHO_T}$PACKAGE" >&6
7711
7712 if test -f "$srcdir/VERSION" ; then
7713         echo "$as_me:7713: checking for package version" >&5
7714 echo $ECHO_N "checking for package version... $ECHO_C" >&6
7715
7716         # if there are not enough fields, cut returns the last one...
7717         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
7718         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
7719         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
7720
7721         # this is how CF_BUNDLED_INTL uses $VERSION:
7722         VERSION="$cf_field1"
7723
7724         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
7725         test -z "$VERSION_MAJOR" && { { echo "$as_me:7725: error: missing major-version" >&5
7726 echo "$as_me: error: missing major-version" >&2;}
7727    { (exit 1); exit 1; }; }
7728
7729         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
7730         test -z "$VERSION_MINOR" && { { echo "$as_me:7730: error: missing minor-version" >&5
7731 echo "$as_me: error: missing minor-version" >&2;}
7732    { (exit 1); exit 1; }; }
7733
7734         echo "$as_me:7734: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
7735 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
7736
7737         echo "$as_me:7737: checking for package patch date" >&5
7738 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
7739         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
7740         case .$VERSION_PATCH in
7741         (.)
7742                 { { echo "$as_me:7742: error: missing patch-date $VERSION_PATCH" >&5
7743 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
7744    { (exit 1); exit 1; }; }
7745                 ;;
7746         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
7747                 ;;
7748         (*)
7749                 { { echo "$as_me:7749: error: illegal patch-date $VERSION_PATCH" >&5
7750 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
7751    { (exit 1); exit 1; }; }
7752                 ;;
7753         esac
7754         echo "$as_me:7754: result: $VERSION_PATCH" >&5
7755 echo "${ECHO_T}$VERSION_PATCH" >&6
7756 else
7757         { { echo "$as_me:7757: error: did not find $srcdir/VERSION" >&5
7758 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
7759    { (exit 1); exit 1; }; }
7760 fi
7761
7762 # show the actual data that we have for versions:
7763 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
7764
7765 echo "${as_me:-configure}:7765: testing ABI VERSION $VERSION ..." 1>&5
7766
7767 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
7768
7769 echo "${as_me:-configure}:7769: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
7770
7771 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
7772
7773 echo "${as_me:-configure}:7773: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
7774
7775 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
7776
7777 echo "${as_me:-configure}:7777: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
7778
7779         cf_PACKAGE=dialog
7780         PACKAGE=$PACKAGE
7781
7782 cat >>confdefs.h <<EOF
7783 #define PACKAGE "$PACKAGE"
7784 EOF
7785
7786 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7787
7788         cat >>confdefs.h <<EOF
7789 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
7790 EOF
7791
7792         cat >>confdefs.h <<EOF
7793 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
7794 EOF
7795
7796 CFG_ROOTNAME=$PACKAGE
7797 HDR_ROOTNAME=$PACKAGE
7798 LIB_ROOTNAME=$PACKAGE
7799
7800 echo "$as_me:7800: checking if we should install dlg_XXX headers to subdirectory" >&5
7801 echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
7802
7803 # Check whether --enable-header-subdir or --disable-header-subdir was given.
7804 if test "${enable_header_subdir+set}" = set; then
7805   enableval="$enable_header_subdir"
7806   SUB_INC=$enableval
7807 else
7808   SUB_INC=no
7809 fi;
7810 echo "$as_me:7810: result: $SUB_INC" >&5
7811 echo "${ECHO_T}$SUB_INC" >&6
7812
7813 case "x${with_man2html}" in
7814 (xno)
7815         cf_man2html=no
7816         ;;
7817 (x|xyes)
7818         # Extract the first word of "man2html", so it can be a program name with args.
7819 set dummy man2html; ac_word=$2
7820 echo "$as_me:7820: checking for $ac_word" >&5
7821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7822 if test "${ac_cv_path_cf_man2html+set}" = set; then
7823   echo $ECHO_N "(cached) $ECHO_C" >&6
7824 else
7825   case $cf_man2html in
7826   [\\/]* | ?:[\\/]*)
7827   ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
7828   ;;
7829   *)
7830   ac_save_IFS=$IFS; IFS=$ac_path_separator
7831 ac_dummy="$PATH"
7832 for ac_dir in $ac_dummy; do
7833   IFS=$ac_save_IFS
7834   test -z "$ac_dir" && ac_dir=.
7835   if $as_executable_p "$ac_dir/$ac_word"; then
7836    ac_cv_path_cf_man2html="$ac_dir/$ac_word"
7837    echo "$as_me:7837: found $ac_dir/$ac_word" >&5
7838    break
7839 fi
7840 done
7841
7842   test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
7843   ;;
7844 esac
7845 fi
7846 cf_man2html=$ac_cv_path_cf_man2html
7847
7848 if test -n "$cf_man2html"; then
7849   echo "$as_me:7849: result: $cf_man2html" >&5
7850 echo "${ECHO_T}$cf_man2html" >&6
7851 else
7852   echo "$as_me:7852: result: no" >&5
7853 echo "${ECHO_T}no" >&6
7854 fi
7855
7856         case "x$cf_man2html" in
7857         (x/*)
7858                 echo "$as_me:7858: checking for the modified Earl Hood script" >&5
7859 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
7860                 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
7861                 then
7862                         cf_man2html_ok=yes
7863                 else
7864                         cf_man2html=no
7865                         cf_man2html_ok=no
7866                 fi
7867                 echo "$as_me:7867: result: $cf_man2html_ok" >&5
7868 echo "${ECHO_T}$cf_man2html_ok" >&6
7869                 ;;
7870         (*)
7871                 cf_man2html=no
7872                 ;;
7873         esac
7874 esac
7875
7876 echo "$as_me:7876: checking for program to convert manpage to html" >&5
7877 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
7878
7879 # Check whether --with-man2html or --without-man2html was given.
7880 if test "${with_man2html+set}" = set; then
7881   withval="$with_man2html"
7882   cf_man2html=$withval
7883 else
7884   cf_man2html=$cf_man2html
7885 fi;
7886
7887 cf_with_groff=no
7888
7889 case $cf_man2html in
7890 (yes)
7891         echo "$as_me:7891: result: man2html" >&5
7892 echo "${ECHO_T}man2html" >&6
7893         # Extract the first word of "man2html", so it can be a program name with args.
7894 set dummy man2html; ac_word=$2
7895 echo "$as_me:7895: checking for $ac_word" >&5
7896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7897 if test "${ac_cv_path_cf_man2html+set}" = set; then
7898   echo $ECHO_N "(cached) $ECHO_C" >&6
7899 else
7900   case $cf_man2html in
7901   [\\/]* | ?:[\\/]*)
7902   ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
7903   ;;
7904   *)
7905   ac_save_IFS=$IFS; IFS=$ac_path_separator
7906 ac_dummy="$PATH"
7907 for ac_dir in $ac_dummy; do
7908   IFS=$ac_save_IFS
7909   test -z "$ac_dir" && ac_dir=.
7910   if $as_executable_p "$ac_dir/$ac_word"; then
7911    ac_cv_path_cf_man2html="$ac_dir/$ac_word"
7912    echo "$as_me:7912: found $ac_dir/$ac_word" >&5
7913    break
7914 fi
7915 done
7916
7917   test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
7918   ;;
7919 esac
7920 fi
7921 cf_man2html=$ac_cv_path_cf_man2html
7922
7923 if test -n "$cf_man2html"; then
7924   echo "$as_me:7924: result: $cf_man2html" >&5
7925 echo "${ECHO_T}$cf_man2html" >&6
7926 else
7927   echo "$as_me:7927: result: no" >&5
7928 echo "${ECHO_T}no" >&6
7929 fi
7930
7931         ;;
7932 (no|groff|*/groff*)
7933         cf_with_groff=yes
7934         cf_man2html=$GROFF_PATH
7935         echo "$as_me:7935: result: $cf_man2html" >&5
7936 echo "${ECHO_T}$cf_man2html" >&6
7937         ;;
7938 (*)
7939         echo "$as_me:7939: result: $cf_man2html" >&5
7940 echo "${ECHO_T}$cf_man2html" >&6
7941         ;;
7942 esac
7943
7944 MAN2HTML_TEMP="man2html.tmp"
7945         cat >$MAN2HTML_TEMP <<CF_EOF
7946 #!$SHELL
7947 # Temporary script generated by CF_WITH_MAN2HTML
7948 # Convert inputs to html, sending result to standard output.
7949 #
7950 # Parameters:
7951 # \${1} = rootname of file to convert
7952 # \${2} = suffix of file to convert, e.g., "1"
7953 # \${3} = macros to use, e.g., "man"
7954 #
7955 ROOT=\$1
7956 TYPE=\$2
7957 MACS=\$3
7958
7959 unset LANG
7960 unset LC_ALL
7961 unset LC_CTYPE
7962 unset LANGUAGE
7963 GROFF_NO_SGR=stupid
7964 export GROFF_NO_SGR
7965
7966 CF_EOF
7967
7968 NROFF_OPTS=
7969 if test "x$cf_with_groff" = xyes
7970 then
7971         MAN2HTML_NOTE="$GROFF_NOTE"
7972         MAN2HTML_PATH="$GROFF_PATH"
7973         cat >>$MAN2HTML_TEMP <<CF_EOF
7974 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
7975 CF_EOF
7976 else
7977         # disable hyphenation if this is groff
7978         if test "x$GROFF_PATH" != xno
7979         then
7980                 echo "$as_me:7980: checking if nroff is really groff" >&5
7981 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
7982                 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
7983                 test -n "$cf_check_groff" && cf_check_groff=yes
7984                 test -n "$cf_check_groff" || cf_check_groff=no
7985                 echo "$as_me:7985: result: $cf_check_groff" >&5
7986 echo "${ECHO_T}$cf_check_groff" >&6
7987                 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
7988         fi
7989         MAN2HTML_NOTE=""
7990
7991 if test "x$prefix" != xNONE; then
7992         cf_path_syntax="$prefix"
7993 else
7994         cf_path_syntax="$ac_default_prefix"
7995 fi
7996
7997 case ".$cf_man2html" in
7998 (.\$\(*\)*|.\'*\'*)
7999         ;;
8000 (..|./*|.\\*)
8001         ;;
8002 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8003         ;;
8004 (.\$\{*prefix\}*|.\$\{*dir\}*)
8005         eval cf_man2html="$cf_man2html"
8006         case ".$cf_man2html" in
8007         (.NONE/*)
8008                 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8009                 ;;
8010         esac
8011         ;;
8012 (.no|.NONE/*)
8013         cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8014         ;;
8015 (*)
8016         { { echo "$as_me:8016: error: expected a pathname, not \"$cf_man2html\"" >&5
8017 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
8018    { (exit 1); exit 1; }; }
8019         ;;
8020 esac
8021
8022         MAN2HTML_PATH="$cf_man2html"
8023         echo "$as_me:8023: checking for $cf_man2html top/bottom margins" >&5
8024 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
8025
8026         # for this example, expect 3 lines of content, the remainder is head/foot
8027         cat >conftest.in <<CF_EOF
8028 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
8029 .SH SECTION
8030 MARKER
8031 CF_EOF
8032
8033         LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8034
8035         cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8036         cf_man2html_top=`expr "$cf_man2html_1st" - 2`
8037         cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
8038         cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
8039         cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
8040
8041         echo "$as_me:8041: result: $cf_man2html_top_bot" >&5
8042 echo "${ECHO_T}$cf_man2html_top_bot" >&6
8043
8044         echo "$as_me:8044: checking for pagesize to use" >&5
8045 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
8046         for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8047         do
8048         cat >>conftest.in <<CF_EOF
8049 .nf
8050 0
8051 1
8052 2
8053 3
8054 4
8055 5
8056 6
8057 7
8058 8
8059 9
8060 CF_EOF
8061         done
8062
8063         LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8064         cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8065         test -z "$cf_man2html_page" && cf_man2html_page=99999
8066         test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
8067
8068         rm -rf conftest*
8069         echo "$as_me:8069: result: $cf_man2html_page" >&5
8070 echo "${ECHO_T}$cf_man2html_page" >&6
8071
8072         cat >>$MAN2HTML_TEMP <<CF_EOF
8073 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
8074 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
8075 case \${TYPE} in
8076 (ms)
8077         $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
8078         ;;
8079 (*)
8080         $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
8081         ;;
8082 esac
8083 CF_EOF
8084 fi
8085
8086 chmod 700 $MAN2HTML_TEMP
8087
8088 EXTRAOBJS=""
8089 echo "$as_me:8089: checking for ANSI C header files" >&5
8090 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8091 if test "${ac_cv_header_stdc+set}" = set; then
8092   echo $ECHO_N "(cached) $ECHO_C" >&6
8093 else
8094   cat >"conftest.$ac_ext" <<_ACEOF
8095 #line 8095 "configure"
8096 #include "confdefs.h"
8097 #include <stdlib.h>
8098 #include <stdarg.h>
8099 #include <string.h>
8100 #include <float.h>
8101
8102 _ACEOF
8103 if { (eval echo "$as_me:8103: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8104   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8105   ac_status=$?
8106   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8107   rm -f conftest.er1
8108   cat conftest.err >&5
8109   echo "$as_me:8109: \$? = $ac_status" >&5
8110   (exit "$ac_status"); } >/dev/null; then
8111   if test -s conftest.err; then
8112     ac_cpp_err=$ac_c_preproc_warn_flag
8113   else
8114     ac_cpp_err=
8115   fi
8116 else
8117   ac_cpp_err=yes
8118 fi
8119 if test -z "$ac_cpp_err"; then
8120   ac_cv_header_stdc=yes
8121 else
8122   echo "$as_me: failed program was:" >&5
8123   cat "conftest.$ac_ext" >&5
8124   ac_cv_header_stdc=no
8125 fi
8126 rm -f conftest.err "conftest.$ac_ext"
8127
8128 if test $ac_cv_header_stdc = yes; then
8129   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8130   cat >"conftest.$ac_ext" <<_ACEOF
8131 #line 8131 "configure"
8132 #include "confdefs.h"
8133 #include <string.h>
8134
8135 _ACEOF
8136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8137   $EGREP "memchr" >/dev/null 2>&1; then
8138   :
8139 else
8140   ac_cv_header_stdc=no
8141 fi
8142 rm -rf conftest*
8143
8144 fi
8145
8146 if test $ac_cv_header_stdc = yes; then
8147   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8148   cat >"conftest.$ac_ext" <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151 #include <stdlib.h>
8152
8153 _ACEOF
8154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8155   $EGREP "free" >/dev/null 2>&1; then
8156   :
8157 else
8158   ac_cv_header_stdc=no
8159 fi
8160 rm -rf conftest*
8161
8162 fi
8163
8164 if test $ac_cv_header_stdc = yes; then
8165   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8166   if test "$cross_compiling" = yes; then
8167   :
8168 else
8169   cat >"conftest.$ac_ext" <<_ACEOF
8170 #line 8170 "configure"
8171 #include "confdefs.h"
8172 #include <ctype.h>
8173 #if ((' ' & 0x0FF) == 0x020)
8174 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8175 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8176 #else
8177 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8178                      || ('j' <= (c) && (c) <= 'r') \
8179                      || ('s' <= (c) && (c) <= 'z'))
8180 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8181 #endif
8182
8183 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8184 int
8185 main (void)
8186 {
8187   int i;
8188   for (i = 0; i < 256; i++)
8189     if (XOR (islower (i), ISLOWER (i))
8190         || toupper (i) != TOUPPER (i))
8191       $ac_main_return(2);
8192   $ac_main_return (0);
8193 }
8194 _ACEOF
8195 rm -f "conftest$ac_exeext"
8196 if { (eval echo "$as_me:8196: \"$ac_link\"") >&5
8197   (eval $ac_link) 2>&5
8198   ac_status=$?
8199   echo "$as_me:8199: \$? = $ac_status" >&5
8200   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8201   { (eval echo "$as_me:8201: \"$ac_try\"") >&5
8202   (eval $ac_try) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit "$ac_status"); }; }; then
8206   :
8207 else
8208   echo "$as_me: program exited with status $ac_status" >&5
8209 echo "$as_me: failed program was:" >&5
8210 cat "conftest.$ac_ext" >&5
8211 ac_cv_header_stdc=no
8212 fi
8213 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8214 fi
8215 fi
8216 fi
8217 echo "$as_me:8217: result: $ac_cv_header_stdc" >&5
8218 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8219 if test $ac_cv_header_stdc = yes; then
8220
8221 cat >>confdefs.h <<\EOF
8222 #define STDC_HEADERS 1
8223 EOF
8224
8225 fi
8226
8227 echo "$as_me:8227: checking for inline" >&5
8228 echo $ECHO_N "checking for inline... $ECHO_C" >&6
8229 if test "${ac_cv_c_inline+set}" = set; then
8230   echo $ECHO_N "(cached) $ECHO_C" >&6
8231 else
8232   ac_cv_c_inline=no
8233 for ac_kw in inline __inline__ __inline; do
8234   cat >"conftest.$ac_ext" <<_ACEOF
8235 #line 8235 "configure"
8236 #include "confdefs.h"
8237 #ifndef __cplusplus
8238 static $ac_kw int static_foo () {return 0; }
8239 $ac_kw int foo () {return 0; }
8240 #endif
8241
8242 _ACEOF
8243 rm -f "conftest.$ac_objext"
8244 if { (eval echo "$as_me:8244: \"$ac_compile\"") >&5
8245   (eval $ac_compile) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit "$ac_status"); } &&
8249          { ac_try='test -s "conftest.$ac_objext"'
8250   { (eval echo "$as_me:8250: \"$ac_try\"") >&5
8251   (eval $ac_try) 2>&5
8252   ac_status=$?
8253   echo "$as_me:8253: \$? = $ac_status" >&5
8254   (exit "$ac_status"); }; }; then
8255   ac_cv_c_inline=$ac_kw; break
8256 else
8257   echo "$as_me: failed program was:" >&5
8258 cat "conftest.$ac_ext" >&5
8259 fi
8260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8261 done
8262
8263 fi
8264 echo "$as_me:8264: result: $ac_cv_c_inline" >&5
8265 echo "${ECHO_T}$ac_cv_c_inline" >&6
8266 case $ac_cv_c_inline in
8267   inline | yes) ;;
8268   no)
8269 cat >>confdefs.h <<\EOF
8270 #define inline
8271 EOF
8272  ;;
8273   *)  cat >>confdefs.h <<EOF
8274 #define inline $ac_cv_c_inline
8275 EOF
8276  ;;
8277 esac
8278
8279 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8280
8281 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8282                   inttypes.h stdint.h unistd.h
8283 do
8284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8285 echo "$as_me:8285: checking for $ac_header" >&5
8286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8288   echo $ECHO_N "(cached) $ECHO_C" >&6
8289 else
8290   cat >"conftest.$ac_ext" <<_ACEOF
8291 #line 8291 "configure"
8292 #include "confdefs.h"
8293 $ac_includes_default
8294 #include <$ac_header>
8295 _ACEOF
8296 rm -f "conftest.$ac_objext"
8297 if { (eval echo "$as_me:8297: \"$ac_compile\"") >&5
8298   (eval $ac_compile) 2>&5
8299   ac_status=$?
8300   echo "$as_me:8300: \$? = $ac_status" >&5
8301   (exit "$ac_status"); } &&
8302          { ac_try='test -s "conftest.$ac_objext"'
8303   { (eval echo "$as_me:8303: \"$ac_try\"") >&5
8304   (eval $ac_try) 2>&5
8305   ac_status=$?
8306   echo "$as_me:8306: \$? = $ac_status" >&5
8307   (exit "$ac_status"); }; }; then
8308   eval "$as_ac_Header=yes"
8309 else
8310   echo "$as_me: failed program was:" >&5
8311 cat "conftest.$ac_ext" >&5
8312 eval "$as_ac_Header=no"
8313 fi
8314 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8315 fi
8316 echo "$as_me:8316: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8317 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8318 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8319   cat >>confdefs.h <<EOF
8320 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8321 EOF
8322
8323 fi
8324 done
8325
8326 echo "$as_me:8326: checking for off_t" >&5
8327 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
8328 if test "${ac_cv_type_off_t+set}" = set; then
8329   echo $ECHO_N "(cached) $ECHO_C" >&6
8330 else
8331   cat >"conftest.$ac_ext" <<_ACEOF
8332 #line 8332 "configure"
8333 #include "confdefs.h"
8334 $ac_includes_default
8335 int
8336 main (void)
8337 {
8338 if ((off_t *) 0)
8339   return 0;
8340 if (sizeof (off_t))
8341   return 0;
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 rm -f "conftest.$ac_objext"
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348   (eval $ac_compile) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit "$ac_status"); } &&
8352          { ac_try='test -s "conftest.$ac_objext"'
8353   { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit "$ac_status"); }; }; then
8358   ac_cv_type_off_t=yes
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 cat "conftest.$ac_ext" >&5
8362 ac_cv_type_off_t=no
8363 fi
8364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8365 fi
8366 echo "$as_me:8366: result: $ac_cv_type_off_t" >&5
8367 echo "${ECHO_T}$ac_cv_type_off_t" >&6
8368 if test "$ac_cv_type_off_t" = yes; then
8369   :
8370 else
8371
8372 cat >>confdefs.h <<EOF
8373 #define off_t long
8374 EOF
8375
8376 fi
8377
8378 echo "$as_me:8378: checking for size_t" >&5
8379 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
8380 if test "${ac_cv_type_size_t+set}" = set; then
8381   echo $ECHO_N "(cached) $ECHO_C" >&6
8382 else
8383   cat >"conftest.$ac_ext" <<_ACEOF
8384 #line 8384 "configure"
8385 #include "confdefs.h"
8386 $ac_includes_default
8387 int
8388 main (void)
8389 {
8390 if ((size_t *) 0)
8391   return 0;
8392 if (sizeof (size_t))
8393   return 0;
8394   ;
8395   return 0;
8396 }
8397 _ACEOF
8398 rm -f "conftest.$ac_objext"
8399 if { (eval echo "$as_me:8399: \"$ac_compile\"") >&5
8400   (eval $ac_compile) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit "$ac_status"); } &&
8404          { ac_try='test -s "conftest.$ac_objext"'
8405   { (eval echo "$as_me:8405: \"$ac_try\"") >&5
8406   (eval $ac_try) 2>&5
8407   ac_status=$?
8408   echo "$as_me:8408: \$? = $ac_status" >&5
8409   (exit "$ac_status"); }; }; then
8410   ac_cv_type_size_t=yes
8411 else
8412   echo "$as_me: failed program was:" >&5
8413 cat "conftest.$ac_ext" >&5
8414 ac_cv_type_size_t=no
8415 fi
8416 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8417 fi
8418 echo "$as_me:8418: result: $ac_cv_type_size_t" >&5
8419 echo "${ECHO_T}$ac_cv_type_size_t" >&6
8420 if test "$ac_cv_type_size_t" = yes; then
8421   :
8422 else
8423
8424 cat >>confdefs.h <<EOF
8425 #define size_t unsigned
8426 EOF
8427
8428 fi
8429
8430 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8431 # for constant arguments.  Useless!
8432 echo "$as_me:8432: checking for working alloca.h" >&5
8433 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
8434 if test "${ac_cv_working_alloca_h+set}" = set; then
8435   echo $ECHO_N "(cached) $ECHO_C" >&6
8436 else
8437   cat >"conftest.$ac_ext" <<_ACEOF
8438 #line 8438 "configure"
8439 #include "confdefs.h"
8440 #include <alloca.h>
8441 int
8442 main (void)
8443 {
8444 char *p = (char *) alloca (2 * sizeof (int));
8445   ;
8446   return 0;
8447 }
8448 _ACEOF
8449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8450 if { (eval echo "$as_me:8450: \"$ac_link\"") >&5
8451   (eval $ac_link) 2>&5
8452   ac_status=$?
8453   echo "$as_me:8453: \$? = $ac_status" >&5
8454   (exit "$ac_status"); } &&
8455          { ac_try='test -s "conftest$ac_exeext"'
8456   { (eval echo "$as_me:8456: \"$ac_try\"") >&5
8457   (eval $ac_try) 2>&5
8458   ac_status=$?
8459   echo "$as_me:8459: \$? = $ac_status" >&5
8460   (exit "$ac_status"); }; }; then
8461   ac_cv_working_alloca_h=yes
8462 else
8463   echo "$as_me: failed program was:" >&5
8464 cat "conftest.$ac_ext" >&5
8465 ac_cv_working_alloca_h=no
8466 fi
8467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8468 fi
8469 echo "$as_me:8469: result: $ac_cv_working_alloca_h" >&5
8470 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
8471 if test $ac_cv_working_alloca_h = yes; then
8472
8473 cat >>confdefs.h <<\EOF
8474 #define HAVE_ALLOCA_H 1
8475 EOF
8476
8477 fi
8478
8479 echo "$as_me:8479: checking for alloca" >&5
8480 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
8481 if test "${ac_cv_func_alloca_works+set}" = set; then
8482   echo $ECHO_N "(cached) $ECHO_C" >&6
8483 else
8484   cat >"conftest.$ac_ext" <<_ACEOF
8485 #line 8485 "configure"
8486 #include "confdefs.h"
8487 #ifdef __GNUC__
8488 # define alloca __builtin_alloca
8489 #else
8490 # ifdef _MSC_VER
8491 #  include <malloc.h>
8492 #  define alloca _alloca
8493 # else
8494 #  if HAVE_ALLOCA_H
8495 #   include <alloca.h>
8496 #  else
8497 #   ifdef _AIX
8498  #pragma alloca
8499 #   else
8500 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8501 char *alloca ();
8502 #    endif
8503 #   endif
8504 #  endif
8505 # endif
8506 #endif
8507
8508 int
8509 main (void)
8510 {
8511 char *p = (char *) alloca (1);
8512   ;
8513   return 0;
8514 }
8515 _ACEOF
8516 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8517 if { (eval echo "$as_me:8517: \"$ac_link\"") >&5
8518   (eval $ac_link) 2>&5
8519   ac_status=$?
8520   echo "$as_me:8520: \$? = $ac_status" >&5
8521   (exit "$ac_status"); } &&
8522          { ac_try='test -s "conftest$ac_exeext"'
8523   { (eval echo "$as_me:8523: \"$ac_try\"") >&5
8524   (eval $ac_try) 2>&5
8525   ac_status=$?
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit "$ac_status"); }; }; then
8528   ac_cv_func_alloca_works=yes
8529 else
8530   echo "$as_me: failed program was:" >&5
8531 cat "conftest.$ac_ext" >&5
8532 ac_cv_func_alloca_works=no
8533 fi
8534 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8535 fi
8536 echo "$as_me:8536: result: $ac_cv_func_alloca_works" >&5
8537 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
8538
8539 if test $ac_cv_func_alloca_works = yes; then
8540
8541 cat >>confdefs.h <<\EOF
8542 #define HAVE_ALLOCA 1
8543 EOF
8544
8545 else
8546   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8547 # that cause trouble.  Some versions do not even contain alloca or
8548 # contain a buggy version.  If you still want to use their alloca,
8549 # use ar to extract alloca.o from them instead of compiling alloca.c.
8550
8551 ALLOCA="alloca.$ac_objext"
8552
8553 cat >>confdefs.h <<\EOF
8554 #define C_ALLOCA 1
8555 EOF
8556
8557 echo "$as_me:8557: checking whether \`alloca.c' needs Cray hooks" >&5
8558 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
8559 if test "${ac_cv_os_cray+set}" = set; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   cat >"conftest.$ac_ext" <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #if defined(CRAY) && ! defined(CRAY2)
8566 webecray
8567 #else
8568 wenotbecray
8569 #endif
8570
8571 _ACEOF
8572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8573   $EGREP "webecray" >/dev/null 2>&1; then
8574   ac_cv_os_cray=yes
8575 else
8576   ac_cv_os_cray=no
8577 fi
8578 rm -rf conftest*
8579
8580 fi
8581 echo "$as_me:8581: result: $ac_cv_os_cray" >&5
8582 echo "${ECHO_T}$ac_cv_os_cray" >&6
8583 if test $ac_cv_os_cray = yes; then
8584   for ac_func in _getb67 GETB67 getb67; do
8585     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8586 echo "$as_me:8586: checking for $ac_func" >&5
8587 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8588 if eval "test \"\${$as_ac_var+set}\" = set"; then
8589   echo $ECHO_N "(cached) $ECHO_C" >&6
8590 else
8591   cat >"conftest.$ac_ext" <<_ACEOF
8592 #line 8592 "configure"
8593 #include "confdefs.h"
8594 #define $ac_func autoconf_temporary
8595 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8596 #undef $ac_func
8597
8598 #ifdef __cplusplus
8599 extern "C"
8600 #endif
8601
8602 /* We use char because int might match the return type of a gcc2
8603    builtin and then its argument prototype would still apply.  */
8604 char $ac_func (void);
8605
8606 int
8607 main (void)
8608 {
8609
8610 /* The GNU C library defines stubs for functions which it implements
8611     to always fail with ENOSYS.  Some functions are actually named
8612     something starting with __ and the normal name is an alias.  */
8613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8614 #error found stub for $ac_func
8615 #endif
8616
8617         return $ac_func ();
8618   ;
8619   return 0;
8620 }
8621 _ACEOF
8622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8623 if { (eval echo "$as_me:8623: \"$ac_link\"") >&5
8624   (eval $ac_link) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit "$ac_status"); } &&
8628          { ac_try='test -s "conftest$ac_exeext"'
8629   { (eval echo "$as_me:8629: \"$ac_try\"") >&5
8630   (eval $ac_try) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit "$ac_status"); }; }; then
8634   eval "$as_ac_var=yes"
8635 else
8636   echo "$as_me: failed program was:" >&5
8637 cat "conftest.$ac_ext" >&5
8638 eval "$as_ac_var=no"
8639 fi
8640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8641 fi
8642 echo "$as_me:8642: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8643 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8644 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8645
8646 cat >>confdefs.h <<EOF
8647 #define CRAY_STACKSEG_END $ac_func
8648 EOF
8649
8650     break
8651 fi
8652
8653   done
8654 fi
8655
8656 echo "$as_me:8656: checking stack direction for C alloca" >&5
8657 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8658 if test "${ac_cv_c_stack_direction+set}" = set; then
8659   echo $ECHO_N "(cached) $ECHO_C" >&6
8660 else
8661   if test "$cross_compiling" = yes; then
8662   ac_cv_c_stack_direction=0
8663 else
8664   cat >"conftest.$ac_ext" <<_ACEOF
8665 #line 8665 "configure"
8666 #include "confdefs.h"
8667 int
8668 find_stack_direction (void)
8669 {
8670   static char *addr = 0;
8671   auto char dummy;
8672   if (addr == 0)
8673     {
8674       addr = &dummy;
8675       return find_stack_direction ();
8676     }
8677   else
8678     return (&dummy > addr) ? 1 : -1;
8679 }
8680
8681 int
8682 main (void)
8683 {
8684   $ac_main_return (find_stack_direction () < 0);
8685 }
8686 _ACEOF
8687 rm -f "conftest$ac_exeext"
8688 if { (eval echo "$as_me:8688: \"$ac_link\"") >&5
8689   (eval $ac_link) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8693   { (eval echo "$as_me:8693: \"$ac_try\"") >&5
8694   (eval $ac_try) 2>&5
8695   ac_status=$?
8696   echo "$as_me:8696: \$? = $ac_status" >&5
8697   (exit "$ac_status"); }; }; then
8698   ac_cv_c_stack_direction=1
8699 else
8700   echo "$as_me: program exited with status $ac_status" >&5
8701 echo "$as_me: failed program was:" >&5
8702 cat "conftest.$ac_ext" >&5
8703 ac_cv_c_stack_direction=-1
8704 fi
8705 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8706 fi
8707 fi
8708 echo "$as_me:8708: result: $ac_cv_c_stack_direction" >&5
8709 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8710
8711 cat >>confdefs.h <<EOF
8712 #define STACK_DIRECTION $ac_cv_c_stack_direction
8713 EOF
8714
8715 fi
8716
8717 for ac_header in stdlib.h unistd.h
8718 do
8719 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8720 echo "$as_me:8720: checking for $ac_header" >&5
8721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8723   echo $ECHO_N "(cached) $ECHO_C" >&6
8724 else
8725   cat >"conftest.$ac_ext" <<_ACEOF
8726 #line 8726 "configure"
8727 #include "confdefs.h"
8728 #include <$ac_header>
8729 _ACEOF
8730 if { (eval echo "$as_me:8730: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8731   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8732   ac_status=$?
8733   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8734   rm -f conftest.er1
8735   cat conftest.err >&5
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit "$ac_status"); } >/dev/null; then
8738   if test -s conftest.err; then
8739     ac_cpp_err=$ac_c_preproc_warn_flag
8740   else
8741     ac_cpp_err=
8742   fi
8743 else
8744   ac_cpp_err=yes
8745 fi
8746 if test -z "$ac_cpp_err"; then
8747   eval "$as_ac_Header=yes"
8748 else
8749   echo "$as_me: failed program was:" >&5
8750   cat "conftest.$ac_ext" >&5
8751   eval "$as_ac_Header=no"
8752 fi
8753 rm -f conftest.err "conftest.$ac_ext"
8754 fi
8755 echo "$as_me:8755: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8756 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8757 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8758   cat >>confdefs.h <<EOF
8759 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8760 EOF
8761
8762 fi
8763 done
8764
8765 for ac_func in getpagesize
8766 do
8767 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8768 echo "$as_me:8768: checking for $ac_func" >&5
8769 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8770 if eval "test \"\${$as_ac_var+set}\" = set"; then
8771   echo $ECHO_N "(cached) $ECHO_C" >&6
8772 else
8773   cat >"conftest.$ac_ext" <<_ACEOF
8774 #line 8774 "configure"
8775 #include "confdefs.h"
8776 #define $ac_func autoconf_temporary
8777 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8778 #undef $ac_func
8779
8780 #ifdef __cplusplus
8781 extern "C"
8782 #endif
8783
8784 /* We use char because int might match the return type of a gcc2
8785    builtin and then its argument prototype would still apply.  */
8786 char $ac_func (void);
8787
8788 int
8789 main (void)
8790 {
8791
8792 /* The GNU C library defines stubs for functions which it implements
8793     to always fail with ENOSYS.  Some functions are actually named
8794     something starting with __ and the normal name is an alias.  */
8795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8796 #error found stub for $ac_func
8797 #endif
8798
8799         return $ac_func ();
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8805 if { (eval echo "$as_me:8805: \"$ac_link\"") >&5
8806   (eval $ac_link) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit "$ac_status"); } &&
8810          { ac_try='test -s "conftest$ac_exeext"'
8811   { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8812   (eval $ac_try) 2>&5
8813   ac_status=$?
8814   echo "$as_me:8814: \$? = $ac_status" >&5
8815   (exit "$ac_status"); }; }; then
8816   eval "$as_ac_var=yes"
8817 else
8818   echo "$as_me: failed program was:" >&5
8819 cat "conftest.$ac_ext" >&5
8820 eval "$as_ac_var=no"
8821 fi
8822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8823 fi
8824 echo "$as_me:8824: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8825 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8826 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8827   cat >>confdefs.h <<EOF
8828 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8829 EOF
8830
8831 fi
8832 done
8833
8834 echo "$as_me:8834: checking for working mmap" >&5
8835 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8836 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8837   echo $ECHO_N "(cached) $ECHO_C" >&6
8838 else
8839   if test "$cross_compiling" = yes; then
8840   ac_cv_func_mmap_fixed_mapped=no
8841 else
8842   cat >"conftest.$ac_ext" <<_ACEOF
8843 #line 8843 "configure"
8844 #include "confdefs.h"
8845 $ac_includes_default
8846 /* Thanks to Mike Haertel and Jim Avera for this test.
8847    Here is a matrix of mmap possibilities:
8848         mmap private not fixed
8849         mmap private fixed at somewhere currently unmapped
8850         mmap private fixed at somewhere already mapped
8851         mmap shared not fixed
8852         mmap shared fixed at somewhere currently unmapped
8853         mmap shared fixed at somewhere already mapped
8854    For private mappings, we should verify that changes cannot be read()
8855    back from the file, nor mmap's back from the file at a different
8856    address.  (There have been systems where private was not correctly
8857    implemented like the infamous i386 svr4.0, and systems where the
8858    VM page cache was not coherent with the file system buffer cache
8859    like early versions of FreeBSD and possibly contemporary NetBSD.)
8860    For shared mappings, we should conversely verify that changes get
8861    propogated back to all the places they're supposed to be.
8862
8863    Grep wants private fixed already mapped.
8864    The main things grep needs to know about mmap are:
8865    * does it exist and is it safe to write into the mmap'd area
8866    * how to use it (BSD variants)  */
8867
8868 #include <fcntl.h>
8869 #include <sys/mman.h>
8870
8871 #if !STDC_HEADERS && !HAVE_STDLIB_H
8872 char *malloc ();
8873 #endif
8874
8875 /* This mess was copied from the GNU getpagesize.h.  */
8876 #if !HAVE_GETPAGESIZE
8877 /* Assume that all systems that can run configure have sys/param.h.  */
8878 # if !HAVE_SYS_PARAM_H
8879 #  define HAVE_SYS_PARAM_H 1
8880 # endif
8881
8882 # ifdef _SC_PAGESIZE
8883 #  define getpagesize() sysconf(_SC_PAGESIZE)
8884 # else /* no _SC_PAGESIZE */
8885 #  if HAVE_SYS_PARAM_H
8886 #   include <sys/param.h>
8887 #   ifdef EXEC_PAGESIZE
8888 #    define getpagesize() EXEC_PAGESIZE
8889 #   else /* no EXEC_PAGESIZE */
8890 #    ifdef NBPG
8891 #     define getpagesize() NBPG * CLSIZE
8892 #     ifndef CLSIZE
8893 #      define CLSIZE 1
8894 #     endif /* no CLSIZE */
8895 #    else /* no NBPG */
8896 #     ifdef NBPC
8897 #      define getpagesize() NBPC
8898 #     else /* no NBPC */
8899 #      ifdef PAGESIZE
8900 #       define getpagesize() PAGESIZE
8901 #      endif /* PAGESIZE */
8902 #     endif /* no NBPC */
8903 #    endif /* no NBPG */
8904 #   endif /* no EXEC_PAGESIZE */
8905 #  else /* no HAVE_SYS_PARAM_H */
8906 #   define getpagesize() 8192   /* punt totally */
8907 #  endif /* no HAVE_SYS_PARAM_H */
8908 # endif /* no _SC_PAGESIZE */
8909
8910 #endif /* no HAVE_GETPAGESIZE */
8911
8912 int
8913 main (void)
8914 {
8915   char *data, *data2, *data3;
8916   int i, pagesize;
8917   int fd;
8918
8919   pagesize = getpagesize ();
8920
8921   /* First, make a file with some known garbage in it. */
8922   data = (char *) malloc (pagesize);
8923   if (!data)
8924     $ac_main_return (1);
8925   for (i = 0; i < pagesize; ++i)
8926     *(data + i) = rand ();
8927   umask (0);
8928   fd = creat ("conftest.mmap", 0600);
8929   if (fd < 0)
8930     $ac_main_return (1);
8931   if (write (fd, data, pagesize) != pagesize)
8932     $ac_main_return (1);
8933   close (fd);
8934
8935   /* Next, try to mmap the file at a fixed address which already has
8936      something else allocated at it.  If we can, also make sure that
8937      we see the same garbage.  */
8938   fd = open ("conftest.mmap", O_RDWR);
8939   if (fd < 0)
8940     $ac_main_return (1);
8941   data2 = (char *) malloc (2 * pagesize);
8942   if (!data2)
8943     $ac_main_return (1);
8944   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8945   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8946                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8947     $ac_main_return (1);
8948   for (i = 0; i < pagesize; ++i)
8949     if (*(data + i) != *(data2 + i))
8950       $ac_main_return (1);
8951
8952   /* Finally, make sure that changes to the mapped area do not
8953      percolate back to the file as seen by read().  (This is a bug on
8954      some variants of i386 svr4.0.)  */
8955   for (i = 0; i < pagesize; ++i)
8956     *(data2 + i) = *(data2 + i) + 1;
8957   data3 = (char *) malloc (pagesize);
8958   if (!data3)
8959     $ac_main_return (1);
8960   if (read (fd, data3, pagesize) != pagesize)
8961     $ac_main_return (1);
8962   for (i = 0; i < pagesize; ++i)
8963     if (*(data + i) != *(data3 + i))
8964       $ac_main_return (1);
8965   close (fd);
8966   $ac_main_return (0);
8967 }
8968 _ACEOF
8969 rm -f "conftest$ac_exeext"
8970 if { (eval echo "$as_me:8970: \"$ac_link\"") >&5
8971   (eval $ac_link) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8975   { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8976   (eval $ac_try) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit "$ac_status"); }; }; then
8980   ac_cv_func_mmap_fixed_mapped=yes
8981 else
8982   echo "$as_me: program exited with status $ac_status" >&5
8983 echo "$as_me: failed program was:" >&5
8984 cat "conftest.$ac_ext" >&5
8985 ac_cv_func_mmap_fixed_mapped=no
8986 fi
8987 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8988 fi
8989 fi
8990 echo "$as_me:8990: result: $ac_cv_func_mmap_fixed_mapped" >&5
8991 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8992 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8993
8994 cat >>confdefs.h <<\EOF
8995 #define HAVE_MMAP 1
8996 EOF
8997
8998 fi
8999 rm -f conftest.mmap
9000
9001 echo "$as_me:9001: checking whether we are using the GNU C Library 2.1 or newer" >&5
9002 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
9003 if test "${ac_cv_gnu_library_2_1+set}" = set; then
9004   echo $ECHO_N "(cached) $ECHO_C" >&6
9005 else
9006   cat >"conftest.$ac_ext" <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9009
9010 #include <features.h>
9011 #ifdef __GNU_LIBRARY__
9012  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
9013   Lucky GNU user
9014  #endif
9015 #endif
9016
9017 _ACEOF
9018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9019   $EGREP "Lucky GNU user" >/dev/null 2>&1; then
9020   ac_cv_gnu_library_2_1=yes
9021 else
9022   ac_cv_gnu_library_2_1=no
9023 fi
9024 rm -rf conftest*
9025
9026 fi
9027 echo "$as_me:9027: result: $ac_cv_gnu_library_2_1" >&5
9028 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
9029
9030         GLIBC21="$ac_cv_gnu_library_2_1"
9031
9032 cf_makefile=makefile
9033
9034 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
9035
9036 # Allow override of "config.h" definition:
9037 : ${CONFIG_H:=config.h}
9038
9039 if test -z "$PACKAGE" ; then
9040         { { echo "$as_me:9040: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
9041 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
9042    { (exit 1); exit 1; }; }
9043 fi
9044
9045 if test -z "$VERSION" ; then
9046 if test -f "$srcdir/VERSION" ; then
9047         VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
9048 else
9049         VERSION=unknown
9050 fi
9051 fi
9052
9053 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
9054 stdlib.h string.h unistd.h sys/param.h
9055 do
9056 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9057 echo "$as_me:9057: checking for $ac_header" >&5
9058 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9059 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9060   echo $ECHO_N "(cached) $ECHO_C" >&6
9061 else
9062   cat >"conftest.$ac_ext" <<_ACEOF
9063 #line 9063 "configure"
9064 #include "confdefs.h"
9065 #include <$ac_header>
9066 _ACEOF
9067 if { (eval echo "$as_me:9067: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9068   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9069   ac_status=$?
9070   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9071   rm -f conftest.er1
9072   cat conftest.err >&5
9073   echo "$as_me:9073: \$? = $ac_status" >&5
9074   (exit "$ac_status"); } >/dev/null; then
9075   if test -s conftest.err; then
9076     ac_cpp_err=$ac_c_preproc_warn_flag
9077   else
9078     ac_cpp_err=
9079   fi
9080 else
9081   ac_cpp_err=yes
9082 fi
9083 if test -z "$ac_cpp_err"; then
9084   eval "$as_ac_Header=yes"
9085 else
9086   echo "$as_me: failed program was:" >&5
9087   cat "conftest.$ac_ext" >&5
9088   eval "$as_ac_Header=no"
9089 fi
9090 rm -f conftest.err "conftest.$ac_ext"
9091 fi
9092 echo "$as_me:9092: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9093 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9094 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9095   cat >>confdefs.h <<EOF
9096 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9097 EOF
9098
9099 fi
9100 done
9101
9102 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
9103 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
9104 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
9105 do
9106 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9107 echo "$as_me:9107: checking for $ac_func" >&5
9108 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9109 if eval "test \"\${$as_ac_var+set}\" = set"; then
9110   echo $ECHO_N "(cached) $ECHO_C" >&6
9111 else
9112   cat >"conftest.$ac_ext" <<_ACEOF
9113 #line 9113 "configure"
9114 #include "confdefs.h"
9115 #define $ac_func autoconf_temporary
9116 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9117 #undef $ac_func
9118
9119 #ifdef __cplusplus
9120 extern "C"
9121 #endif
9122
9123 /* We use char because int might match the return type of a gcc2
9124    builtin and then its argument prototype would still apply.  */
9125 char $ac_func (void);
9126
9127 int
9128 main (void)
9129 {
9130
9131 /* The GNU C library defines stubs for functions which it implements
9132     to always fail with ENOSYS.  Some functions are actually named
9133     something starting with __ and the normal name is an alias.  */
9134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9135 #error found stub for $ac_func
9136 #endif
9137
9138         return $ac_func ();
9139   ;
9140   return 0;
9141 }
9142 _ACEOF
9143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9144 if { (eval echo "$as_me:9144: \"$ac_link\"") >&5
9145   (eval $ac_link) 2>&5
9146   ac_status=$?
9147   echo "$as_me:9147: \$? = $ac_status" >&5
9148   (exit "$ac_status"); } &&
9149          { ac_try='test -s "conftest$ac_exeext"'
9150   { (eval echo "$as_me:9150: \"$ac_try\"") >&5
9151   (eval $ac_try) 2>&5
9152   ac_status=$?
9153   echo "$as_me:9153: \$? = $ac_status" >&5
9154   (exit "$ac_status"); }; }; then
9155   eval "$as_ac_var=yes"
9156 else
9157   echo "$as_me: failed program was:" >&5
9158 cat "conftest.$ac_ext" >&5
9159 eval "$as_ac_var=no"
9160 fi
9161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9162 fi
9163 echo "$as_me:9163: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9164 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9165 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9166   cat >>confdefs.h <<EOF
9167 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9168 EOF
9169
9170 fi
9171 done
9172
9173 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9174 if test "${with_libiconv_prefix+set}" = set; then
9175   withval="$with_libiconv_prefix"
9176
9177 case "$withval" in
9178 (no)
9179         ;;
9180 (yes)
9181         ;;
9182 (*)
9183
9184 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9185         if test -d "$cf_searchpath/include" ; then
9186
9187 if test -n "$cf_searchpath/include" ; then
9188   for cf_add_incdir in $cf_searchpath/include
9189   do
9190         while test "$cf_add_incdir" != /usr/include
9191         do
9192           if test -d "$cf_add_incdir"
9193           then
9194                 cf_have_incdir=no
9195                 if test -n "$CFLAGS$CPPFLAGS" ; then
9196                   # a loop is needed to ensure we can add subdirs of existing dirs
9197                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9198                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9199                           cf_have_incdir=yes; break
9200                         fi
9201                   done
9202                 fi
9203
9204                 if test "$cf_have_incdir" = no ; then
9205                   if test "$cf_add_incdir" = /usr/local/include ; then
9206                         if test "$GCC" = yes
9207                         then
9208                           cf_save_CPPFLAGS=$CPPFLAGS
9209
9210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9211         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9212
9213                           cat >"conftest.$ac_ext" <<_ACEOF
9214 #line 9214 "configure"
9215 #include "confdefs.h"
9216 #include <stdio.h>
9217 int
9218 main (void)
9219 {
9220 printf("Hello")
9221   ;
9222   return 0;
9223 }
9224 _ACEOF
9225 rm -f "conftest.$ac_objext"
9226 if { (eval echo "$as_me:9226: \"$ac_compile\"") >&5
9227   (eval $ac_compile) 2>&5
9228   ac_status=$?
9229   echo "$as_me:9229: \$? = $ac_status" >&5
9230   (exit "$ac_status"); } &&
9231          { ac_try='test -s "conftest.$ac_objext"'
9232   { (eval echo "$as_me:9232: \"$ac_try\"") >&5
9233   (eval $ac_try) 2>&5
9234   ac_status=$?
9235   echo "$as_me:9235: \$? = $ac_status" >&5
9236   (exit "$ac_status"); }; }; then
9237   :
9238 else
9239   echo "$as_me: failed program was:" >&5
9240 cat "conftest.$ac_ext" >&5
9241 cf_have_incdir=yes
9242 fi
9243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9244                           CPPFLAGS=$cf_save_CPPFLAGS
9245                         fi
9246                   fi
9247                 fi
9248
9249                 if test "$cf_have_incdir" = no ; then
9250                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9251
9252 echo "${as_me:-configure}:9252: testing adding $cf_add_incdir to include-path ..." 1>&5
9253
9254                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9255
9256                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9257                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9258                   cf_add_incdir="$cf_top_incdir"
9259                 else
9260                   break
9261                 fi
9262           else
9263                 break
9264           fi
9265         done
9266   done
9267 fi
9268
9269         elif test -d "$cf_searchpath/../include" ; then
9270
9271 if test -n "$cf_searchpath/../include" ; then
9272   for cf_add_incdir in $cf_searchpath/../include
9273   do
9274         while test "$cf_add_incdir" != /usr/include
9275         do
9276           if test -d "$cf_add_incdir"
9277           then
9278                 cf_have_incdir=no
9279                 if test -n "$CFLAGS$CPPFLAGS" ; then
9280                   # a loop is needed to ensure we can add subdirs of existing dirs
9281                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9282                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9283                           cf_have_incdir=yes; break
9284                         fi
9285                   done
9286                 fi
9287
9288                 if test "$cf_have_incdir" = no ; then
9289                   if test "$cf_add_incdir" = /usr/local/include ; then
9290                         if test "$GCC" = yes
9291                         then
9292                           cf_save_CPPFLAGS=$CPPFLAGS
9293
9294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9295         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9296
9297                           cat >"conftest.$ac_ext" <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 #include <stdio.h>
9301 int
9302 main (void)
9303 {
9304 printf("Hello")
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f "conftest.$ac_objext"
9310 if { (eval echo "$as_me:9310: \"$ac_compile\"") >&5
9311   (eval $ac_compile) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit "$ac_status"); } &&
9315          { ac_try='test -s "conftest.$ac_objext"'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit "$ac_status"); }; }; then
9321   :
9322 else
9323   echo "$as_me: failed program was:" >&5
9324 cat "conftest.$ac_ext" >&5
9325 cf_have_incdir=yes
9326 fi
9327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9328                           CPPFLAGS=$cf_save_CPPFLAGS
9329                         fi
9330                   fi
9331                 fi
9332
9333                 if test "$cf_have_incdir" = no ; then
9334                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9335
9336 echo "${as_me:-configure}:9336: testing adding $cf_add_incdir to include-path ..." 1>&5
9337
9338                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9339
9340                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9341                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9342                   cf_add_incdir="$cf_top_incdir"
9343                 else
9344                   break
9345                 fi
9346           else
9347                 break
9348           fi
9349         done
9350   done
9351 fi
9352
9353         else
9354 { { echo "$as_me:9354: error: cannot find libiconv under $withval" >&5
9355 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9356    { (exit 1); exit 1; }; }
9357         fi
9358         if test -d "$cf_searchpath/lib" ; then
9359
9360 if test -n "$cf_searchpath/lib" ; then
9361         for cf_add_libdir in $cf_searchpath/lib
9362         do
9363                 if test "$cf_add_libdir" = /usr/lib ; then
9364                         :
9365                 elif test -d "$cf_add_libdir"
9366                 then
9367                         cf_have_libdir=no
9368                         if test -n "$LDFLAGS$LIBS" ; then
9369                                 # a loop is needed to ensure we can add subdirs of existing dirs
9370                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9371                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9372                                                 cf_have_libdir=yes; break
9373                                         fi
9374                                 done
9375                         fi
9376                         if test "$cf_have_libdir" = no ; then
9377                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9378
9379 echo "${as_me:-configure}:9379: testing adding $cf_add_libdir to library-path ..." 1>&5
9380
9381                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9382                         fi
9383                 fi
9384         done
9385 fi
9386
9387         elif test -d "$cf_searchpath" ; then
9388
9389 if test -n "$cf_searchpath" ; then
9390         for cf_add_libdir in $cf_searchpath
9391         do
9392                 if test "$cf_add_libdir" = /usr/lib ; then
9393                         :
9394                 elif test -d "$cf_add_libdir"
9395                 then
9396                         cf_have_libdir=no
9397                         if test -n "$LDFLAGS$LIBS" ; then
9398                                 # a loop is needed to ensure we can add subdirs of existing dirs
9399                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9400                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9401                                                 cf_have_libdir=yes; break
9402                                         fi
9403                                 done
9404                         fi
9405                         if test "$cf_have_libdir" = no ; then
9406                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9407
9408 echo "${as_me:-configure}:9408: testing adding $cf_add_libdir to library-path ..." 1>&5
9409
9410                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9411                         fi
9412                 fi
9413         done
9414 fi
9415
9416         else
9417 { { echo "$as_me:9417: error: cannot find libiconv under $withval" >&5
9418 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9419    { (exit 1); exit 1; }; }
9420         fi
9421 done
9422
9423         ;;
9424 esac
9425
9426 fi;
9427
9428   echo "$as_me:9428: checking for iconv" >&5
9429 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
9430 if test "${am_cv_func_iconv+set}" = set; then
9431   echo $ECHO_N "(cached) $ECHO_C" >&6
9432 else
9433
9434 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9435 # will be set on completion of the AC_TRY_LINK below.
9436 cf_cv_header_path_iconv=
9437 cf_cv_library_path_iconv=
9438
9439 echo "${as_me:-configure}:9439: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
9440
9441 cf_save_LIBS="$LIBS"
9442
9443 cat >"conftest.$ac_ext" <<_ACEOF
9444 #line 9444 "configure"
9445 #include "confdefs.h"
9446
9447 #include <stdlib.h>
9448 #include <iconv.h>
9449
9450 int
9451 main (void)
9452 {
9453
9454         iconv_t cd = iconv_open("","");
9455         iconv(cd,NULL,NULL,NULL,NULL);
9456         iconv_close(cd);
9457
9458   ;
9459   return 0;
9460 }
9461 _ACEOF
9462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9463 if { (eval echo "$as_me:9463: \"$ac_link\"") >&5
9464   (eval $ac_link) 2>&5
9465   ac_status=$?
9466   echo "$as_me:9466: \$? = $ac_status" >&5
9467   (exit "$ac_status"); } &&
9468          { ac_try='test -s "conftest$ac_exeext"'
9469   { (eval echo "$as_me:9469: \"$ac_try\"") >&5
9470   (eval $ac_try) 2>&5
9471   ac_status=$?
9472   echo "$as_me:9472: \$? = $ac_status" >&5
9473   (exit "$ac_status"); }; }; then
9474
9475         cf_cv_find_linkage_iconv=yes
9476         cf_cv_header_path_iconv=/usr/include
9477         cf_cv_library_path_iconv=/usr/lib
9478
9479 else
9480   echo "$as_me: failed program was:" >&5
9481 cat "conftest.$ac_ext" >&5
9482
9483 LIBS="-liconv  $cf_save_LIBS"
9484
9485 cat >"conftest.$ac_ext" <<_ACEOF
9486 #line 9486 "configure"
9487 #include "confdefs.h"
9488
9489 #include <stdlib.h>
9490 #include <iconv.h>
9491
9492 int
9493 main (void)
9494 {
9495
9496         iconv_t cd = iconv_open("","");
9497         iconv(cd,NULL,NULL,NULL,NULL);
9498         iconv_close(cd);
9499
9500   ;
9501   return 0;
9502 }
9503 _ACEOF
9504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9505 if { (eval echo "$as_me:9505: \"$ac_link\"") >&5
9506   (eval $ac_link) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit "$ac_status"); } &&
9510          { ac_try='test -s "conftest$ac_exeext"'
9511   { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9512   (eval $ac_try) 2>&5
9513   ac_status=$?
9514   echo "$as_me:9514: \$? = $ac_status" >&5
9515   (exit "$ac_status"); }; }; then
9516
9517         cf_cv_find_linkage_iconv=yes
9518         cf_cv_header_path_iconv=/usr/include
9519         cf_cv_library_path_iconv=/usr/lib
9520         cf_cv_library_file_iconv="-liconv"
9521
9522 else
9523   echo "$as_me: failed program was:" >&5
9524 cat "conftest.$ac_ext" >&5
9525
9526         cf_cv_find_linkage_iconv=no
9527         LIBS="$cf_save_LIBS"
9528
9529         test -n "$verbose" && echo "    find linkage for iconv library" 1>&6
9530
9531 echo "${as_me:-configure}:9531: testing find linkage for iconv library ..." 1>&5
9532
9533 echo "${as_me:-configure}:9533: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
9534
9535         cf_save_CPPFLAGS="$CPPFLAGS"
9536         cf_test_CPPFLAGS="$CPPFLAGS"
9537
9538 cf_search=
9539
9540 # collect the current set of include-directories from compiler flags
9541 cf_header_path_list=""
9542 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9543         for cf_header_path in $CPPFLAGS $CFLAGS
9544         do
9545                 case "$cf_header_path" in
9546                 (-I*)
9547                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9548
9549 test "x$cf_header_path" != "xNONE" && \
9550 test -d "$cf_header_path" && \
9551  {
9552         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9553         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
9554         test -d "$cf_header_path/include/iconv" &&       cf_search="$cf_search $cf_header_path/include/iconv"
9555         test -d "$cf_header_path/include/iconv/include" &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
9556         test -d "$cf_header_path/iconv/include" &&       cf_search="$cf_search $cf_header_path/iconv/include"
9557         test -d "$cf_header_path/iconv/include/iconv" &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9558 }
9559
9560                         cf_header_path_list="$cf_header_path_list $cf_search"
9561                         ;;
9562                 esac
9563         done
9564 fi
9565
9566 # add the variations for the package we are looking for
9567
9568 cf_search=
9569
9570 test "x$prefix" != "xNONE" && \
9571 test -d "$prefix" && \
9572  {
9573         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9574         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
9575         test -d "$prefix/include/iconv" &&       cf_search="$cf_search $prefix/include/iconv"
9576         test -d "$prefix/include/iconv/include" &&    cf_search="$cf_search $prefix/include/iconv/include"
9577         test -d "$prefix/iconv/include" &&       cf_search="$cf_search $prefix/iconv/include"
9578         test -d "$prefix/iconv/include/iconv" &&    cf_search="$cf_search $prefix/iconv/include/iconv"
9579 }
9580
9581 for cf_subdir_prefix in \
9582         /usr \
9583         /usr/local \
9584         /usr/pkg \
9585         /opt \
9586         /opt/local \
9587         $HOME
9588 do
9589
9590 test "x$cf_subdir_prefix" != "x$prefix" && \
9591 test -d "$cf_subdir_prefix" && \
9592 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9593         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9594         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
9595         test -d "$cf_subdir_prefix/include/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9596         test -d "$cf_subdir_prefix/include/iconv/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9597         test -d "$cf_subdir_prefix/iconv/include" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9598         test -d "$cf_subdir_prefix/iconv/include/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9599 }
9600
9601 done
9602
9603 test "$includedir" != NONE && \
9604 test "$includedir" != "/usr/include" && \
9605 test -d "$includedir" && {
9606         test -d "$includedir" &&    cf_search="$cf_search $includedir"
9607         test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9608 }
9609
9610 test "$oldincludedir" != NONE && \
9611 test "$oldincludedir" != "/usr/include" && \
9612 test -d "$oldincludedir" && {
9613         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
9614         test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9615 }
9616
9617 cf_search="$cf_search $cf_header_path_list"
9618
9619         for cf_cv_header_path_iconv in $cf_search
9620         do
9621                 if test -d "$cf_cv_header_path_iconv" ; then
9622                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_iconv" 1>&6
9623
9624 echo "${as_me:-configure}:9624: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9625
9626                         CPPFLAGS="$cf_save_CPPFLAGS"
9627
9628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9629         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9630
9631                         cat >"conftest.$ac_ext" <<_ACEOF
9632 #line 9632 "configure"
9633 #include "confdefs.h"
9634
9635 #include <stdlib.h>
9636 #include <iconv.h>
9637
9638 int
9639 main (void)
9640 {
9641
9642         iconv_t cd = iconv_open("","");
9643         iconv(cd,NULL,NULL,NULL,NULL);
9644         iconv_close(cd);
9645
9646   ;
9647   return 0;
9648 }
9649 _ACEOF
9650 rm -f "conftest.$ac_objext"
9651 if { (eval echo "$as_me:9651: \"$ac_compile\"") >&5
9652   (eval $ac_compile) 2>&5
9653   ac_status=$?
9654   echo "$as_me:9654: \$? = $ac_status" >&5
9655   (exit "$ac_status"); } &&
9656          { ac_try='test -s "conftest.$ac_objext"'
9657   { (eval echo "$as_me:9657: \"$ac_try\"") >&5
9658   (eval $ac_try) 2>&5
9659   ac_status=$?
9660   echo "$as_me:9660: \$? = $ac_status" >&5
9661   (exit "$ac_status"); }; }; then
9662
9663                                 test -n "$verbose" && echo "    ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9664
9665 echo "${as_me:-configure}:9665: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9666
9667                                 cf_cv_find_linkage_iconv=maybe
9668                                 cf_test_CPPFLAGS="$CPPFLAGS"
9669                                 break
9670 else
9671   echo "$as_me: failed program was:" >&5
9672 cat "conftest.$ac_ext" >&5
9673
9674                                 CPPFLAGS="$cf_save_CPPFLAGS"
9675
9676 fi
9677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9678                 fi
9679         done
9680
9681         if test "$cf_cv_find_linkage_iconv" = maybe ; then
9682
9683 echo "${as_me:-configure}:9683: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9684
9685                 cf_save_LIBS="$LIBS"
9686                 cf_save_LDFLAGS="$LDFLAGS"
9687
9688                 if test "$cf_cv_find_linkage_iconv" != yes ; then
9689
9690 cf_search=
9691 cf_library_path_list=""
9692 if test -n "${LDFLAGS}${LIBS}" ; then
9693         for cf_library_path in $LDFLAGS $LIBS
9694         do
9695                 case "$cf_library_path" in
9696                 (-L*)
9697                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9698
9699 test "x$cf_library_path" != "xNONE" && \
9700 test -d "$cf_library_path" && \
9701  {
9702         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9703         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
9704         test -d "$cf_library_path/lib/iconv" &&       cf_search="$cf_search $cf_library_path/lib/iconv"
9705         test -d "$cf_library_path/lib/iconv/lib" &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9706         test -d "$cf_library_path/iconv/lib" &&       cf_search="$cf_search $cf_library_path/iconv/lib"
9707         test -d "$cf_library_path/iconv/lib/iconv" &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9708 }
9709
9710                         cf_library_path_list="$cf_library_path_list $cf_search"
9711                         ;;
9712                 esac
9713         done
9714 fi
9715
9716 cf_search=
9717
9718 test "x$prefix" != "xNONE" && \
9719 test -d "$prefix" && \
9720  {
9721         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9722         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
9723         test -d "$prefix/lib/iconv" &&       cf_search="$cf_search $prefix/lib/iconv"
9724         test -d "$prefix/lib/iconv/lib" &&    cf_search="$cf_search $prefix/lib/iconv/lib"
9725         test -d "$prefix/iconv/lib" &&       cf_search="$cf_search $prefix/iconv/lib"
9726         test -d "$prefix/iconv/lib/iconv" &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
9727 }
9728
9729 for cf_subdir_prefix in \
9730         /usr \
9731         /usr/local \
9732         /usr/pkg \
9733         /opt \
9734         /opt/local \
9735         $HOME
9736 do
9737
9738 test "x$cf_subdir_prefix" != "x$prefix" && \
9739 test -d "$cf_subdir_prefix" && \
9740 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9741         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9742         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9743         test -d "$cf_subdir_prefix/lib/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9744         test -d "$cf_subdir_prefix/lib/iconv/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9745         test -d "$cf_subdir_prefix/iconv/lib" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9746         test -d "$cf_subdir_prefix/iconv/lib/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9747 }
9748
9749 done
9750
9751 cf_search="$cf_library_path_list $cf_search"
9752
9753                         for cf_cv_library_path_iconv in $cf_search
9754                         do
9755                                 if test -d "$cf_cv_library_path_iconv" ; then
9756                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_iconv" 1>&6
9757
9758 echo "${as_me:-configure}:9758: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9759
9760                                         CPPFLAGS="$cf_test_CPPFLAGS"
9761                                         LIBS="-liconv  $cf_save_LIBS"
9762                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9763                                         cat >"conftest.$ac_ext" <<_ACEOF
9764 #line 9764 "configure"
9765 #include "confdefs.h"
9766
9767 #include <stdlib.h>
9768 #include <iconv.h>
9769
9770 int
9771 main (void)
9772 {
9773
9774         iconv_t cd = iconv_open("","");
9775         iconv(cd,NULL,NULL,NULL,NULL);
9776         iconv_close(cd);
9777
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9783 if { (eval echo "$as_me:9783: \"$ac_link\"") >&5
9784   (eval $ac_link) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit "$ac_status"); } &&
9788          { ac_try='test -s "conftest$ac_exeext"'
9789   { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790   (eval $ac_try) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit "$ac_status"); }; }; then
9794
9795                                         test -n "$verbose" && echo "    ... found iconv library in $cf_cv_library_path_iconv" 1>&6
9796
9797 echo "${as_me:-configure}:9797: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9798
9799                                         cf_cv_find_linkage_iconv=yes
9800                                         cf_cv_library_file_iconv="-liconv"
9801                                         break
9802 else
9803   echo "$as_me: failed program was:" >&5
9804 cat "conftest.$ac_ext" >&5
9805
9806                                         CPPFLAGS="$cf_save_CPPFLAGS"
9807                                         LIBS="$cf_save_LIBS"
9808                                         LDFLAGS="$cf_save_LDFLAGS"
9809
9810 fi
9811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9812                                 fi
9813                         done
9814                         CPPFLAGS="$cf_save_CPPFLAGS"
9815                         LDFLAGS="$cf_save_LDFLAGS"
9816                 fi
9817
9818         else
9819                 cf_cv_find_linkage_iconv=no
9820         fi
9821
9822 fi
9823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9824
9825 fi
9826 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9827
9828 LIBS="$cf_save_LIBS"
9829
9830 if test "$cf_cv_find_linkage_iconv" = yes ; then
9831 am_cv_func_iconv=yes
9832 else
9833 am_cv_func_iconv="no, consider installing GNU libiconv"
9834 fi
9835
9836 fi
9837 echo "$as_me:9837: result: $am_cv_func_iconv" >&5
9838 echo "${ECHO_T}$am_cv_func_iconv" >&6
9839
9840   if test "$am_cv_func_iconv" = yes; then
9841
9842 cat >>confdefs.h <<\EOF
9843 #define HAVE_ICONV 1
9844 EOF
9845
9846     echo "$as_me:9846: checking if the declaration of iconv() needs const." >&5
9847 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9848 if test "${am_cv_proto_iconv_const+set}" = set; then
9849   echo $ECHO_N "(cached) $ECHO_C" >&6
9850 else
9851
9852       cat >"conftest.$ac_ext" <<_ACEOF
9853 #line 9853 "configure"
9854 #include "confdefs.h"
9855
9856 #include <stdlib.h>
9857 #include <iconv.h>
9858
9859 extern
9860 #ifdef __cplusplus
9861 "C"
9862 #endif
9863 #if defined(__STDC__) || defined(__cplusplus)
9864 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9865 #else
9866 size_t iconv();
9867 #endif
9868
9869 int
9870 main (void)
9871 {
9872
9873   ;
9874   return 0;
9875 }
9876 _ACEOF
9877 rm -f "conftest.$ac_objext"
9878 if { (eval echo "$as_me:9878: \"$ac_compile\"") >&5
9879   (eval $ac_compile) 2>&5
9880   ac_status=$?
9881   echo "$as_me:9881: \$? = $ac_status" >&5
9882   (exit "$ac_status"); } &&
9883          { ac_try='test -s "conftest.$ac_objext"'
9884   { (eval echo "$as_me:9884: \"$ac_try\"") >&5
9885   (eval $ac_try) 2>&5
9886   ac_status=$?
9887   echo "$as_me:9887: \$? = $ac_status" >&5
9888   (exit "$ac_status"); }; }; then
9889   am_cv_proto_iconv_const=no
9890 else
9891   echo "$as_me: failed program was:" >&5
9892 cat "conftest.$ac_ext" >&5
9893 am_cv_proto_iconv_const=yes
9894 fi
9895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9896 fi
9897 echo "$as_me:9897: result: $am_cv_proto_iconv_const" >&5
9898 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9899
9900     if test "$am_cv_proto_iconv_const" = yes ; then
9901       am_cv_proto_iconv_arg1="const"
9902     else
9903       am_cv_proto_iconv_arg1=""
9904     fi
9905
9906 cat >>confdefs.h <<EOF
9907 #define ICONV_CONST $am_cv_proto_iconv_arg1
9908 EOF
9909
9910   fi
9911
9912   LIBICONV=
9913   if test "$cf_cv_find_linkage_iconv" = yes; then
9914
9915 if test -n "$cf_cv_header_path_iconv" ; then
9916   for cf_add_incdir in $cf_cv_header_path_iconv
9917   do
9918         while test "$cf_add_incdir" != /usr/include
9919         do
9920           if test -d "$cf_add_incdir"
9921           then
9922                 cf_have_incdir=no
9923                 if test -n "$CFLAGS$CPPFLAGS" ; then
9924                   # a loop is needed to ensure we can add subdirs of existing dirs
9925                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9926                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9927                           cf_have_incdir=yes; break
9928                         fi
9929                   done
9930                 fi
9931
9932                 if test "$cf_have_incdir" = no ; then
9933                   if test "$cf_add_incdir" = /usr/local/include ; then
9934                         if test "$GCC" = yes
9935                         then
9936                           cf_save_CPPFLAGS=$CPPFLAGS
9937
9938         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9939         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9940
9941                           cat >"conftest.$ac_ext" <<_ACEOF
9942 #line 9942 "configure"
9943 #include "confdefs.h"
9944 #include <stdio.h>
9945 int
9946 main (void)
9947 {
9948 printf("Hello")
9949   ;
9950   return 0;
9951 }
9952 _ACEOF
9953 rm -f "conftest.$ac_objext"
9954 if { (eval echo "$as_me:9954: \"$ac_compile\"") >&5
9955   (eval $ac_compile) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit "$ac_status"); } &&
9959          { ac_try='test -s "conftest.$ac_objext"'
9960   { (eval echo "$as_me:9960: \"$ac_try\"") >&5
9961   (eval $ac_try) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit "$ac_status"); }; }; then
9965   :
9966 else
9967   echo "$as_me: failed program was:" >&5
9968 cat "conftest.$ac_ext" >&5
9969 cf_have_incdir=yes
9970 fi
9971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9972                           CPPFLAGS=$cf_save_CPPFLAGS
9973                         fi
9974                   fi
9975                 fi
9976
9977                 if test "$cf_have_incdir" = no ; then
9978                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9979
9980 echo "${as_me:-configure}:9980: testing adding $cf_add_incdir to include-path ..." 1>&5
9981
9982                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9983
9984                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9985                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9986                   cf_add_incdir="$cf_top_incdir"
9987                 else
9988                   break
9989                 fi
9990           else
9991                 break
9992           fi
9993         done
9994   done
9995 fi
9996
9997     if test -n "$cf_cv_library_file_iconv" ; then
9998       LIBICONV="-liconv"
9999
10000 if test -n "$cf_cv_library_path_iconv" ; then
10001         for cf_add_libdir in $cf_cv_library_path_iconv
10002         do
10003                 if test "$cf_add_libdir" = /usr/lib ; then
10004                         :
10005                 elif test -d "$cf_add_libdir"
10006                 then
10007                         cf_have_libdir=no
10008                         if test -n "$LDFLAGS$LIBS" ; then
10009                                 # a loop is needed to ensure we can add subdirs of existing dirs
10010                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10011                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10012                                                 cf_have_libdir=yes; break
10013                                         fi
10014                                 done
10015                         fi
10016                         if test "$cf_have_libdir" = no ; then
10017                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10018
10019 echo "${as_me:-configure}:10019: testing adding $cf_add_libdir to library-path ..." 1>&5
10020
10021                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10022                         fi
10023                 fi
10024         done
10025 fi
10026
10027     fi
10028   fi
10029
10030 echo "$as_me:10030: checking for nl_langinfo and CODESET" >&5
10031 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10032 if test "${am_cv_langinfo_codeset+set}" = set; then
10033   echo $ECHO_N "(cached) $ECHO_C" >&6
10034 else
10035   cat >"conftest.$ac_ext" <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 #include <langinfo.h>
10039 int
10040 main (void)
10041 {
10042 char* cs = nl_langinfo(CODESET); (void)cs
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); } &&
10053          { ac_try='test -s "conftest$ac_exeext"'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit "$ac_status"); }; }; then
10059   am_cv_langinfo_codeset=yes
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 am_cv_langinfo_codeset=no
10064 fi
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066
10067 fi
10068 echo "$as_me:10068: result: $am_cv_langinfo_codeset" >&5
10069 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10070         if test "$am_cv_langinfo_codeset" = yes; then
10071
10072 cat >>confdefs.h <<\EOF
10073 #define HAVE_LANGINFO_CODESET 1
10074 EOF
10075
10076         fi
10077
10078    if test "$ac_cv_header_locale_h" = yes; then
10079         echo "$as_me:10079: checking for LC_MESSAGES" >&5
10080 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
10081 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10082   echo $ECHO_N "(cached) $ECHO_C" >&6
10083 else
10084   cat >"conftest.$ac_ext" <<_ACEOF
10085 #line 10085 "configure"
10086 #include "confdefs.h"
10087 #include <locale.h>
10088 int
10089 main (void)
10090 {
10091 return LC_MESSAGES
10092   ;
10093   return 0;
10094 }
10095 _ACEOF
10096 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10097 if { (eval echo "$as_me:10097: \"$ac_link\"") >&5
10098   (eval $ac_link) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit "$ac_status"); } &&
10102          { ac_try='test -s "conftest$ac_exeext"'
10103   { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104   (eval $ac_try) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit "$ac_status"); }; }; then
10108   am_cv_val_LC_MESSAGES=yes
10109 else
10110   echo "$as_me: failed program was:" >&5
10111 cat "conftest.$ac_ext" >&5
10112 am_cv_val_LC_MESSAGES=no
10113 fi
10114 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10115 fi
10116 echo "$as_me:10116: result: $am_cv_val_LC_MESSAGES" >&5
10117 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
10118         if test "$am_cv_val_LC_MESSAGES" = yes; then
10119
10120 cat >>confdefs.h <<\EOF
10121 #define HAVE_LC_MESSAGES 1
10122 EOF
10123
10124         fi
10125 fi
10126    echo "$as_me:10126: checking whether NLS is requested" >&5
10127 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
10128
10129 # Check whether --enable-nls or --disable-nls was given.
10130 if test "${enable_nls+set}" = set; then
10131   enableval="$enable_nls"
10132   USE_NLS=$enableval
10133 else
10134   USE_NLS=no
10135 fi;
10136   echo "$as_me:10136: result: $USE_NLS" >&5
10137 echo "${ECHO_T}$USE_NLS" >&6
10138
10139   BUILD_INCLUDED_LIBINTL=no
10140   USE_INCLUDED_LIBINTL=no
10141   INTLLIBS=
10142
10143     if test "$USE_NLS" = "yes"; then
10144         POSUB=po
10145
10146 cat >>confdefs.h <<\EOF
10147 #define ENABLE_NLS 1
10148 EOF
10149
10150     echo "$as_me:10150: checking whether included gettext is requested" >&5
10151 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
10152
10153 # Check whether --with-included-gettext or --without-included-gettext was given.
10154 if test "${with_included_gettext+set}" = set; then
10155   withval="$with_included_gettext"
10156   nls_cv_force_use_gnu_gettext=$withval
10157 else
10158   nls_cv_force_use_gnu_gettext=no
10159 fi;
10160     echo "$as_me:10160: result: $nls_cv_force_use_gnu_gettext" >&5
10161 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
10162
10163     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
10164     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
10165                         CATOBJEXT=NONE
10166
10167                                           cf_save_msgfmt_path="$MSGFMT"
10168       cf_save_xgettext_path="$XGETTEXT"
10169
10170             # Extract the first word of "msgfmt", so it can be a program name with args.
10171
10172 set dummy msgfmt; ac_word=$2
10173 echo "$as_me:10173: checking for $ac_word" >&5
10174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10175 if test "${ac_cv_path_MSGFMT+set}" = set; then
10176   echo $ECHO_N "(cached) $ECHO_C" >&6
10177 else
10178   case "$MSGFMT" in
10179   ([\\/]*|?:[\\/]*)
10180   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10181   ;;
10182   (*)
10183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10184   for ac_dir in $PATH; do
10185     test -z "$ac_dir" && ac_dir=.
10186     if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10187       if "$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1; then
10188         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
10189         break
10190       fi
10191     fi
10192   done
10193   IFS="$ac_save_ifs"
10194   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10195   ;;
10196 esac
10197 fi
10198 MSGFMT="$ac_cv_path_MSGFMT"
10199 if test "$MSGFMT" != ":"; then
10200   echo "$as_me:10200: result: $MSGFMT" >&5
10201 echo "${ECHO_T}$MSGFMT" >&6
10202 else
10203   echo "$as_me:10203: result: no" >&5
10204 echo "${ECHO_T}no" >&6
10205 fi
10206
10207       # Extract the first word of "gmsgfmt", so it can be a program name with args.
10208 set dummy gmsgfmt; ac_word=$2
10209 echo "$as_me:10209: checking for $ac_word" >&5
10210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10211 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10212   echo $ECHO_N "(cached) $ECHO_C" >&6
10213 else
10214   case $GMSGFMT in
10215   [\\/]* | ?:[\\/]*)
10216   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10217   ;;
10218   *)
10219   ac_save_IFS=$IFS; IFS=$ac_path_separator
10220 ac_dummy="$PATH"
10221 for ac_dir in $ac_dummy; do
10222   IFS=$ac_save_IFS
10223   test -z "$ac_dir" && ac_dir=.
10224   if $as_executable_p "$ac_dir/$ac_word"; then
10225    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
10226    echo "$as_me:10226: found $ac_dir/$ac_word" >&5
10227    break
10228 fi
10229 done
10230
10231   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10232   ;;
10233 esac
10234 fi
10235 GMSGFMT=$ac_cv_path_GMSGFMT
10236
10237 if test -n "$GMSGFMT"; then
10238   echo "$as_me:10238: result: $GMSGFMT" >&5
10239 echo "${ECHO_T}$GMSGFMT" >&6
10240 else
10241   echo "$as_me:10241: result: no" >&5
10242 echo "${ECHO_T}no" >&6
10243 fi
10244
10245             # Extract the first word of "xgettext", so it can be a program name with args.
10246
10247 set dummy xgettext; ac_word=$2
10248 echo "$as_me:10248: checking for $ac_word" >&5
10249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10250 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10251   echo $ECHO_N "(cached) $ECHO_C" >&6
10252 else
10253   case "$XGETTEXT" in
10254   ([\\/]*|?:[\\/]*)
10255   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10256   ;;
10257   (*)
10258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10259   for ac_dir in $PATH; do
10260     test -z "$ac_dir" && ac_dir=.
10261     if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10262       if "$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1; then
10263         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
10264         break
10265       fi
10266     fi
10267   done
10268   IFS="$ac_save_ifs"
10269   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10270   ;;
10271 esac
10272 fi
10273 XGETTEXT="$ac_cv_path_XGETTEXT"
10274 if test "$XGETTEXT" != ":"; then
10275   echo "$as_me:10275: result: $XGETTEXT" >&5
10276 echo "${ECHO_T}$XGETTEXT" >&6
10277 else
10278   echo "$as_me:10278: result: no" >&5
10279 echo "${ECHO_T}no" >&6
10280 fi
10281
10282       cf_save_OPTS_1="$CPPFLAGS"
10283       if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
10284          test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
10285
10286 cf_fix_cppflags=no
10287 cf_new_cflags=
10288 cf_new_cppflags=
10289 cf_new_extra_cppflags=
10290
10291 for cf_add_cflags in -DIGNORE_MSGFMT_HACK
10292 do
10293 case "$cf_fix_cppflags" in
10294 (no)
10295         case "$cf_add_cflags" in
10296         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10297                 case "$cf_add_cflags" in
10298                 (-D*)
10299                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10300
10301                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10302                                 && test -z "${cf_tst_cflags}" \
10303                                 && cf_fix_cppflags=yes
10304
10305                         if test "$cf_fix_cppflags" = yes ; then
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                                 continue
10311                         elif test "${cf_tst_cflags}" = "\"'" ; then
10312
10313         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10314         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10315
10316                                 continue
10317                         fi
10318                         ;;
10319                 esac
10320                 case "$CPPFLAGS" in
10321                 (*$cf_add_cflags)
10322                         ;;
10323                 (*)
10324                         case "$cf_add_cflags" in
10325                         (-D*)
10326                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10327
10328 CPPFLAGS=`echo "$CPPFLAGS" | \
10329         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10330                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10331
10332                                 ;;
10333                         esac
10334
10335         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10336         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10337
10338                         ;;
10339                 esac
10340                 ;;
10341         (*)
10342
10343         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10344         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10345
10346                 ;;
10347         esac
10348         ;;
10349 (yes)
10350
10351         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10352         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10353
10354         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10355
10356         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10357                 && test -z "${cf_tst_cflags}" \
10358                 && cf_fix_cppflags=no
10359         ;;
10360 esac
10361 done
10362
10363 if test -n "$cf_new_cflags" ; then
10364
10365         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10366         CFLAGS="${CFLAGS}$cf_new_cflags"
10367
10368 fi
10369
10370 if test -n "$cf_new_cppflags" ; then
10371
10372         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10373         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10374
10375 fi
10376
10377 if test -n "$cf_new_extra_cppflags" ; then
10378
10379         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10380         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10381
10382 fi
10383
10384       fi
10385
10386       cf_save_LIBS_1="$LIBS"
10387
10388 cf_add_libs="$LIBS"
10389 # reverse order
10390 cf_add_0lib=
10391 for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10392 # filter duplicates
10393 for cf_add_1lib in $cf_add_0lib; do
10394         for cf_add_2lib in $cf_add_libs; do
10395                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10396                         cf_add_1lib=
10397                         break
10398                 fi
10399         done
10400         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10401 done
10402 LIBS="$cf_add_libs"
10403
10404 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10405 # will be set on completion of the AC_TRY_LINK below.
10406 cf_cv_header_path_intl=
10407 cf_cv_library_path_intl=
10408
10409 echo "${as_me:-configure}:10409: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
10410
10411 cf_save_LIBS="$LIBS"
10412
10413 cat >"conftest.$ac_ext" <<_ACEOF
10414 #line 10414 "configure"
10415 #include "confdefs.h"
10416
10417 #include <libintl.h>
10418 extern int _nl_msg_cat_cntr;
10419
10420 int
10421 main (void)
10422 {
10423
10424         bindtextdomain ("", "");
10425         return (int) gettext ("")
10426
10427 #ifndef IGNORE_MSGFMT_HACK
10428                          + _nl_msg_cat_cntr
10429 #endif
10430
10431   ;
10432   return 0;
10433 }
10434 _ACEOF
10435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10436 if { (eval echo "$as_me:10436: \"$ac_link\"") >&5
10437   (eval $ac_link) 2>&5
10438   ac_status=$?
10439   echo "$as_me:10439: \$? = $ac_status" >&5
10440   (exit "$ac_status"); } &&
10441          { ac_try='test -s "conftest$ac_exeext"'
10442   { (eval echo "$as_me:10442: \"$ac_try\"") >&5
10443   (eval $ac_try) 2>&5
10444   ac_status=$?
10445   echo "$as_me:10445: \$? = $ac_status" >&5
10446   (exit "$ac_status"); }; }; then
10447
10448         cf_cv_find_linkage_intl=yes
10449         cf_cv_header_path_intl=/usr/include
10450         cf_cv_library_path_intl=/usr/lib
10451
10452 else
10453   echo "$as_me: failed program was:" >&5
10454 cat "conftest.$ac_ext" >&5
10455
10456 LIBS="-lintl  $cf_save_LIBS"
10457
10458 cat >"conftest.$ac_ext" <<_ACEOF
10459 #line 10459 "configure"
10460 #include "confdefs.h"
10461
10462 #include <libintl.h>
10463 extern int _nl_msg_cat_cntr;
10464
10465 int
10466 main (void)
10467 {
10468
10469         bindtextdomain ("", "");
10470         return (int) gettext ("")
10471
10472 #ifndef IGNORE_MSGFMT_HACK
10473                          + _nl_msg_cat_cntr
10474 #endif
10475
10476   ;
10477   return 0;
10478 }
10479 _ACEOF
10480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10481 if { (eval echo "$as_me:10481: \"$ac_link\"") >&5
10482   (eval $ac_link) 2>&5
10483   ac_status=$?
10484   echo "$as_me:10484: \$? = $ac_status" >&5
10485   (exit "$ac_status"); } &&
10486          { ac_try='test -s "conftest$ac_exeext"'
10487   { (eval echo "$as_me:10487: \"$ac_try\"") >&5
10488   (eval $ac_try) 2>&5
10489   ac_status=$?
10490   echo "$as_me:10490: \$? = $ac_status" >&5
10491   (exit "$ac_status"); }; }; then
10492
10493         cf_cv_find_linkage_intl=yes
10494         cf_cv_header_path_intl=/usr/include
10495         cf_cv_library_path_intl=/usr/lib
10496         cf_cv_library_file_intl="-lintl"
10497
10498 else
10499   echo "$as_me: failed program was:" >&5
10500 cat "conftest.$ac_ext" >&5
10501
10502         cf_cv_find_linkage_intl=no
10503         LIBS="$cf_save_LIBS"
10504
10505         test -n "$verbose" && echo "    find linkage for intl library" 1>&6
10506
10507 echo "${as_me:-configure}:10507: testing find linkage for intl library ..." 1>&5
10508
10509 echo "${as_me:-configure}:10509: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
10510
10511         cf_save_CPPFLAGS="$CPPFLAGS"
10512         cf_test_CPPFLAGS="$CPPFLAGS"
10513
10514 cf_search=
10515
10516 # collect the current set of include-directories from compiler flags
10517 cf_header_path_list=""
10518 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10519         for cf_header_path in $CPPFLAGS $CFLAGS
10520         do
10521                 case "$cf_header_path" in
10522                 (-I*)
10523                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10524
10525 test "x$cf_header_path" != "xNONE" && \
10526 test -d "$cf_header_path" && \
10527  {
10528         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10529         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
10530         test -d "$cf_header_path/include/intl" &&       cf_search="$cf_search $cf_header_path/include/intl"
10531         test -d "$cf_header_path/include/intl/include" &&    cf_search="$cf_search $cf_header_path/include/intl/include"
10532         test -d "$cf_header_path/intl/include" &&       cf_search="$cf_search $cf_header_path/intl/include"
10533         test -d "$cf_header_path/intl/include/intl" &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
10534 }
10535
10536                         cf_header_path_list="$cf_header_path_list $cf_search"
10537                         ;;
10538                 esac
10539         done
10540 fi
10541
10542 # add the variations for the package we are looking for
10543
10544 cf_search=
10545
10546 test "x$prefix" != "xNONE" && \
10547 test -d "$prefix" && \
10548  {
10549         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10550         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
10551         test -d "$prefix/include/intl" &&       cf_search="$cf_search $prefix/include/intl"
10552         test -d "$prefix/include/intl/include" &&    cf_search="$cf_search $prefix/include/intl/include"
10553         test -d "$prefix/intl/include" &&       cf_search="$cf_search $prefix/intl/include"
10554         test -d "$prefix/intl/include/intl" &&    cf_search="$cf_search $prefix/intl/include/intl"
10555 }
10556
10557 for cf_subdir_prefix in \
10558         /usr \
10559         /usr/local \
10560         /usr/pkg \
10561         /opt \
10562         /opt/local \
10563         $HOME
10564 do
10565
10566 test "x$cf_subdir_prefix" != "x$prefix" && \
10567 test -d "$cf_subdir_prefix" && \
10568 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10569         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10570         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
10571         test -d "$cf_subdir_prefix/include/intl" &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
10572         test -d "$cf_subdir_prefix/include/intl/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
10573         test -d "$cf_subdir_prefix/intl/include" &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
10574         test -d "$cf_subdir_prefix/intl/include/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
10575 }
10576
10577 done
10578
10579 test "$includedir" != NONE && \
10580 test "$includedir" != "/usr/include" && \
10581 test -d "$includedir" && {
10582         test -d "$includedir" &&    cf_search="$cf_search $includedir"
10583         test -d "$includedir/intl" && cf_search="$cf_search $includedir/intl"
10584 }
10585
10586 test "$oldincludedir" != NONE && \
10587 test "$oldincludedir" != "/usr/include" && \
10588 test -d "$oldincludedir" && {
10589         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
10590         test -d "$oldincludedir/intl" && cf_search="$cf_search $oldincludedir/intl"
10591 }
10592
10593 cf_search="$cf_search $cf_header_path_list"
10594
10595         for cf_cv_header_path_intl in $cf_search
10596         do
10597                 if test -d "$cf_cv_header_path_intl" ; then
10598                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_intl" 1>&6
10599
10600 echo "${as_me:-configure}:10600: testing ... testing $cf_cv_header_path_intl ..." 1>&5
10601
10602                         CPPFLAGS="$cf_save_CPPFLAGS"
10603
10604         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10605         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
10606
10607                         cat >"conftest.$ac_ext" <<_ACEOF
10608 #line 10608 "configure"
10609 #include "confdefs.h"
10610
10611 #include <libintl.h>
10612 extern int _nl_msg_cat_cntr;
10613
10614 int
10615 main (void)
10616 {
10617
10618         bindtextdomain ("", "");
10619         return (int) gettext ("")
10620
10621 #ifndef IGNORE_MSGFMT_HACK
10622                          + _nl_msg_cat_cntr
10623 #endif
10624
10625   ;
10626   return 0;
10627 }
10628 _ACEOF
10629 rm -f "conftest.$ac_objext"
10630 if { (eval echo "$as_me:10630: \"$ac_compile\"") >&5
10631   (eval $ac_compile) 2>&5
10632   ac_status=$?
10633   echo "$as_me:10633: \$? = $ac_status" >&5
10634   (exit "$ac_status"); } &&
10635          { ac_try='test -s "conftest.$ac_objext"'
10636   { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637   (eval $ac_try) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit "$ac_status"); }; }; then
10641
10642                                 test -n "$verbose" && echo "    ... found intl headers in $cf_cv_header_path_intl" 1>&6
10643
10644 echo "${as_me:-configure}:10644: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
10645
10646                                 cf_cv_find_linkage_intl=maybe
10647                                 cf_test_CPPFLAGS="$CPPFLAGS"
10648                                 break
10649 else
10650   echo "$as_me: failed program was:" >&5
10651 cat "conftest.$ac_ext" >&5
10652
10653                                 CPPFLAGS="$cf_save_CPPFLAGS"
10654
10655 fi
10656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10657                 fi
10658         done
10659
10660         if test "$cf_cv_find_linkage_intl" = maybe ; then
10661
10662 echo "${as_me:-configure}:10662: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
10663
10664                 cf_save_LIBS="$LIBS"
10665                 cf_save_LDFLAGS="$LDFLAGS"
10666
10667                 if test "$cf_cv_find_linkage_intl" != yes ; then
10668
10669 cf_search=
10670 cf_library_path_list=""
10671 if test -n "${LDFLAGS}${LIBS}" ; then
10672         for cf_library_path in $LDFLAGS $LIBS
10673         do
10674                 case "$cf_library_path" in
10675                 (-L*)
10676                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10677
10678 test "x$cf_library_path" != "xNONE" && \
10679 test -d "$cf_library_path" && \
10680  {
10681         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10682         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
10683         test -d "$cf_library_path/lib/intl" &&       cf_search="$cf_search $cf_library_path/lib/intl"
10684         test -d "$cf_library_path/lib/intl/lib" &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
10685         test -d "$cf_library_path/intl/lib" &&       cf_search="$cf_search $cf_library_path/intl/lib"
10686         test -d "$cf_library_path/intl/lib/intl" &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
10687 }
10688
10689                         cf_library_path_list="$cf_library_path_list $cf_search"
10690                         ;;
10691                 esac
10692         done
10693 fi
10694
10695 cf_search=
10696
10697 test "x$prefix" != "xNONE" && \
10698 test -d "$prefix" && \
10699  {
10700         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10701         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
10702         test -d "$prefix/lib/intl" &&       cf_search="$cf_search $prefix/lib/intl"
10703         test -d "$prefix/lib/intl/lib" &&    cf_search="$cf_search $prefix/lib/intl/lib"
10704         test -d "$prefix/intl/lib" &&       cf_search="$cf_search $prefix/intl/lib"
10705         test -d "$prefix/intl/lib/intl" &&    cf_search="$cf_search $prefix/intl/lib/intl"
10706 }
10707
10708 for cf_subdir_prefix in \
10709         /usr \
10710         /usr/local \
10711         /usr/pkg \
10712         /opt \
10713         /opt/local \
10714         $HOME
10715 do
10716
10717 test "x$cf_subdir_prefix" != "x$prefix" && \
10718 test -d "$cf_subdir_prefix" && \
10719 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10720         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10721         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10722         test -d "$cf_subdir_prefix/lib/intl" &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
10723         test -d "$cf_subdir_prefix/lib/intl/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
10724         test -d "$cf_subdir_prefix/intl/lib" &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
10725         test -d "$cf_subdir_prefix/intl/lib/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
10726 }
10727
10728 done
10729
10730 cf_search="$cf_library_path_list $cf_search"
10731
10732                         for cf_cv_library_path_intl in $cf_search
10733                         do
10734                                 if test -d "$cf_cv_library_path_intl" ; then
10735                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_intl" 1>&6
10736
10737 echo "${as_me:-configure}:10737: testing ... testing $cf_cv_library_path_intl ..." 1>&5
10738
10739                                         CPPFLAGS="$cf_test_CPPFLAGS"
10740                                         LIBS="-lintl  $cf_save_LIBS"
10741                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
10742                                         cat >"conftest.$ac_ext" <<_ACEOF
10743 #line 10743 "configure"
10744 #include "confdefs.h"
10745
10746 #include <libintl.h>
10747 extern int _nl_msg_cat_cntr;
10748
10749 int
10750 main (void)
10751 {
10752
10753         bindtextdomain ("", "");
10754         return (int) gettext ("")
10755
10756 #ifndef IGNORE_MSGFMT_HACK
10757                          + _nl_msg_cat_cntr
10758 #endif
10759
10760   ;
10761   return 0;
10762 }
10763 _ACEOF
10764 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10765 if { (eval echo "$as_me:10765: \"$ac_link\"") >&5
10766   (eval $ac_link) 2>&5
10767   ac_status=$?
10768   echo "$as_me:10768: \$? = $ac_status" >&5
10769   (exit "$ac_status"); } &&
10770          { ac_try='test -s "conftest$ac_exeext"'
10771   { (eval echo "$as_me:10771: \"$ac_try\"") >&5
10772   (eval $ac_try) 2>&5
10773   ac_status=$?
10774   echo "$as_me:10774: \$? = $ac_status" >&5
10775   (exit "$ac_status"); }; }; then
10776
10777                                         test -n "$verbose" && echo "    ... found intl library in $cf_cv_library_path_intl" 1>&6
10778
10779 echo "${as_me:-configure}:10779: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
10780
10781                                         cf_cv_find_linkage_intl=yes
10782                                         cf_cv_library_file_intl="-lintl"
10783                                         break
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 cat "conftest.$ac_ext" >&5
10787
10788                                         CPPFLAGS="$cf_save_CPPFLAGS"
10789                                         LIBS="$cf_save_LIBS"
10790                                         LDFLAGS="$cf_save_LDFLAGS"
10791
10792 fi
10793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10794                                 fi
10795                         done
10796                         CPPFLAGS="$cf_save_CPPFLAGS"
10797                         LDFLAGS="$cf_save_LDFLAGS"
10798                 fi
10799
10800         else
10801                 cf_cv_find_linkage_intl=no
10802         fi
10803
10804 fi
10805 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10806
10807 fi
10808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10809
10810 LIBS="$cf_save_LIBS"
10811
10812 if test "$cf_cv_find_linkage_intl" = yes ; then
10813 cf_cv_func_gettext=yes
10814 else
10815 cf_cv_func_gettext=no
10816 fi
10817
10818       echo "$as_me:10818: checking for libintl.h and gettext()" >&5
10819 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
10820       echo "$as_me:10820: result: $cf_cv_func_gettext" >&5
10821 echo "${ECHO_T}$cf_cv_func_gettext" >&6
10822
10823       LIBS="$cf_save_LIBS_1"
10824       CPPFLAGS="$cf_save_OPTS_1"
10825
10826       if test "$cf_cv_func_gettext" = yes ; then
10827
10828 cat >>confdefs.h <<\EOF
10829 #define HAVE_LIBINTL_H 1
10830 EOF
10831
10832                                         if test "$PACKAGE" != gettext; then
10833
10834 cat >>confdefs.h <<\EOF
10835 #define HAVE_GETTEXT 1
10836 EOF
10837
10838 if test -n "$cf_cv_header_path_intl" ; then
10839   for cf_add_incdir in $cf_cv_header_path_intl
10840   do
10841         while test "$cf_add_incdir" != /usr/include
10842         do
10843           if test -d "$cf_add_incdir"
10844           then
10845                 cf_have_incdir=no
10846                 if test -n "$CFLAGS$CPPFLAGS" ; then
10847                   # a loop is needed to ensure we can add subdirs of existing dirs
10848                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10849                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10850                           cf_have_incdir=yes; break
10851                         fi
10852                   done
10853                 fi
10854
10855                 if test "$cf_have_incdir" = no ; then
10856                   if test "$cf_add_incdir" = /usr/local/include ; then
10857                         if test "$GCC" = yes
10858                         then
10859                           cf_save_CPPFLAGS=$CPPFLAGS
10860
10861         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10862         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10863
10864                           cat >"conftest.$ac_ext" <<_ACEOF
10865 #line 10865 "configure"
10866 #include "confdefs.h"
10867 #include <stdio.h>
10868 int
10869 main (void)
10870 {
10871 printf("Hello")
10872   ;
10873   return 0;
10874 }
10875 _ACEOF
10876 rm -f "conftest.$ac_objext"
10877 if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878   (eval $ac_compile) 2>&5
10879   ac_status=$?
10880   echo "$as_me:10880: \$? = $ac_status" >&5
10881   (exit "$ac_status"); } &&
10882          { ac_try='test -s "conftest.$ac_objext"'
10883   { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884   (eval $ac_try) 2>&5
10885   ac_status=$?
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit "$ac_status"); }; }; then
10888   :
10889 else
10890   echo "$as_me: failed program was:" >&5
10891 cat "conftest.$ac_ext" >&5
10892 cf_have_incdir=yes
10893 fi
10894 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10895                           CPPFLAGS=$cf_save_CPPFLAGS
10896                         fi
10897                   fi
10898                 fi
10899
10900                 if test "$cf_have_incdir" = no ; then
10901                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10902
10903 echo "${as_me:-configure}:10903: testing adding $cf_add_incdir to include-path ..." 1>&5
10904
10905                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10906
10907                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10908                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10909                   cf_add_incdir="$cf_top_incdir"
10910                 else
10911                   break
10912                 fi
10913           else
10914                 break
10915           fi
10916         done
10917   done
10918 fi
10919
10920           if test -n "$cf_cv_library_file_intl" ; then
10921                                                 INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
10922
10923 if test -n "$cf_cv_library_path_intl" ; then
10924         for cf_add_libdir in $cf_cv_library_path_intl
10925         do
10926                 if test "$cf_add_libdir" = /usr/lib ; then
10927                         :
10928                 elif test -d "$cf_add_libdir"
10929                 then
10930                         cf_have_libdir=no
10931                         if test -n "$LDFLAGS$LIBS" ; then
10932                                 # a loop is needed to ensure we can add subdirs of existing dirs
10933                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10934                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10935                                                 cf_have_libdir=yes; break
10936                                         fi
10937                                 done
10938                         fi
10939                         if test "$cf_have_libdir" = no ; then
10940                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10941
10942 echo "${as_me:-configure}:10942: testing adding $cf_add_libdir to library-path ..." 1>&5
10943
10944                                 INTLLIBS="-L$cf_add_libdir $INTLLIBS"
10945                         fi
10946                 fi
10947         done
10948 fi
10949
10950           fi
10951
10952           gt_save_LIBS="$LIBS"
10953           LIBS="$LIBS $INTLLIBS"
10954
10955 for ac_func in dcgettext
10956 do
10957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10958 echo "$as_me:10958: checking for $ac_func" >&5
10959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10960 if eval "test \"\${$as_ac_var+set}\" = set"; then
10961   echo $ECHO_N "(cached) $ECHO_C" >&6
10962 else
10963   cat >"conftest.$ac_ext" <<_ACEOF
10964 #line 10964 "configure"
10965 #include "confdefs.h"
10966 #define $ac_func autoconf_temporary
10967 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10968 #undef $ac_func
10969
10970 #ifdef __cplusplus
10971 extern "C"
10972 #endif
10973
10974 /* We use char because int might match the return type of a gcc2
10975    builtin and then its argument prototype would still apply.  */
10976 char $ac_func (void);
10977
10978 int
10979 main (void)
10980 {
10981
10982 /* The GNU C library defines stubs for functions which it implements
10983     to always fail with ENOSYS.  Some functions are actually named
10984     something starting with __ and the normal name is an alias.  */
10985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10986 #error found stub for $ac_func
10987 #endif
10988
10989         return $ac_func ();
10990   ;
10991   return 0;
10992 }
10993 _ACEOF
10994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10995 if { (eval echo "$as_me:10995: \"$ac_link\"") >&5
10996   (eval $ac_link) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit "$ac_status"); } &&
11000          { ac_try='test -s "conftest$ac_exeext"'
11001   { (eval echo "$as_me:11001: \"$ac_try\"") >&5
11002   (eval $ac_try) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit "$ac_status"); }; }; then
11006   eval "$as_ac_var=yes"
11007 else
11008   echo "$as_me: failed program was:" >&5
11009 cat "conftest.$ac_ext" >&5
11010 eval "$as_ac_var=no"
11011 fi
11012 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11013 fi
11014 echo "$as_me:11014: result: `eval echo '${'"$as_ac_var"'}'`" >&5
11015 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
11016 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
11017   cat >>confdefs.h <<EOF
11018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11019 EOF
11020
11021 fi
11022 done
11023
11024           LIBS="$gt_save_LIBS"
11025
11026           CATOBJEXT=.gmo
11027         fi
11028       elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
11029         { echo "$as_me:11029: WARNING: disabling NLS feature" >&5
11030 echo "$as_me: WARNING: disabling NLS feature" >&2;}
11031         sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
11032         mv confdefs.tmp confdefs.h
11033         ALL_LINGUAS=
11034         CATOBJEXT=.ignored
11035         MSGFMT=":"
11036         GMSGFMT=":"
11037         XGETTEXT=":"
11038         POSUB=
11039         BUILD_INCLUDED_LIBINTL=no
11040         USE_INCLUDED_LIBINTL=no
11041         USE_NLS=no
11042         nls_cv_use_gnu_gettext=no
11043       fi
11044
11045       if test "$CATOBJEXT" = "NONE"; then
11046                         nls_cv_use_gnu_gettext=maybe
11047       fi
11048     fi
11049
11050     if test "$nls_cv_use_gnu_gettext" != "no"; then
11051       CATOBJEXT=.gmo
11052       if test -f "$srcdir/intl/libintl.h" ; then
11053                 INTLOBJS="\$(GETTOBJS)"
11054         BUILD_INCLUDED_LIBINTL=yes
11055         USE_INCLUDED_LIBINTL=yes
11056         INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
11057         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
11058       elif test "$nls_cv_use_gnu_gettext" = "yes"; then
11059         nls_cv_use_gnu_gettext=no
11060         { echo "$as_me:11060: WARNING: no NLS library is packaged with this application" >&5
11061 echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
11062       fi
11063     fi
11064
11065         if test "$GMSGFMT" != ":"; then
11066       if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
11067         : ;
11068       else
11069         { echo "$as_me:11069: WARNING: found msgfmt program is not GNU msgfmt" >&5
11070 echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
11071       fi
11072     fi
11073
11074         if test "$XGETTEXT" != ":"; then
11075       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
11076         : ;
11077       else
11078         { echo "$as_me:11078: WARNING: found xgettext program is not GNU xgettext" >&5
11079 echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
11080       fi
11081     fi
11082   fi
11083
11084   if test "$XGETTEXT" != ":"; then
11085     ac_config_commands="$ac_config_commands default-1"
11086
11087             if test "$PACKAGE" = gettext; then
11088       BUILD_INCLUDED_LIBINTL=yes
11089     fi
11090
11091                                             if test "$nls_cv_use_gnu_gettext" = "yes"; then
11092       for ac_prog in bison
11093 do
11094   # Extract the first word of "$ac_prog", so it can be a program name with args.
11095 set dummy $ac_prog; ac_word=$2
11096 echo "$as_me:11096: checking for $ac_word" >&5
11097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11098 if test "${ac_cv_prog_INTLBISON+set}" = set; then
11099   echo $ECHO_N "(cached) $ECHO_C" >&6
11100 else
11101   if test -n "$INTLBISON"; then
11102   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
11103 else
11104   ac_save_IFS=$IFS; IFS=$ac_path_separator
11105 ac_dummy="$PATH"
11106 for ac_dir in $ac_dummy; do
11107   IFS=$ac_save_IFS
11108   test -z "$ac_dir" && ac_dir=.
11109   $as_executable_p "$ac_dir/$ac_word" || continue
11110 ac_cv_prog_INTLBISON="$ac_prog"
11111 echo "$as_me:11111: found $ac_dir/$ac_word" >&5
11112 break
11113 done
11114
11115 fi
11116 fi
11117 INTLBISON=$ac_cv_prog_INTLBISON
11118 if test -n "$INTLBISON"; then
11119   echo "$as_me:11119: result: $INTLBISON" >&5
11120 echo "${ECHO_T}$INTLBISON" >&6
11121 else
11122   echo "$as_me:11122: result: no" >&5
11123 echo "${ECHO_T}no" >&6
11124 fi
11125
11126   test -n "$INTLBISON" && break
11127 done
11128
11129       if test -z "$INTLBISON"; then
11130         ac_verc_fail=yes
11131       else
11132                 echo "$as_me:11132: checking version of bison" >&5
11133 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
11134         ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
11135         case "$ac_prog_version" in
11136           ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
11137           (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
11138              ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
11139           (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
11140         esac
11141       echo "$as_me:11141: result: $ac_prog_version" >&5
11142 echo "${ECHO_T}$ac_prog_version" >&6
11143       fi
11144       if test "$ac_verc_fail" = yes; then
11145         INTLBISON=:
11146       fi
11147     fi
11148
11149                 for lang in $ALL_LINGUAS; do
11150       GMOFILES="$GMOFILES $lang.gmo"
11151       POFILES="$POFILES $lang.po"
11152     done
11153   fi
11154
11155     nls_cv_header_intl=
11156   nls_cv_header_libgt=
11157
11158     DATADIRNAME=share
11159
11160     INSTOBJEXT=.mo
11161
11162     GENCAT=gencat
11163
11164    if test "x$CATOBJEXT" != "x"; then
11165      if test "x$ALL_LINGUAS" = "x"; then
11166        LINGUAS=
11167      else
11168        echo "$as_me:11168: checking for catalogs to be installed" >&5
11169 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
11170        NEW_LINGUAS=
11171        for presentlang in $ALL_LINGUAS; do
11172          useit=no
11173          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
11174            # Use the presentlang catalog if desiredlang is
11175            #   a. equal to presentlang, or
11176            #   b. a variant of presentlang (because in this case,
11177            #      presentlang can be used as a fallback for messages
11178            #      which are not translated in the desiredlang catalog).
11179            case "$desiredlang" in
11180              ("$presentlang"*) useit=yes;;
11181            esac
11182          done
11183          if test "$useit" = yes; then
11184            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
11185          fi
11186        done
11187        LINGUAS=$NEW_LINGUAS
11188        echo "$as_me:11188: result: $LINGUAS" >&5
11189 echo "${ECHO_T}$LINGUAS" >&6
11190      fi
11191
11192           if test -n "$LINGUAS"; then
11193        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
11194      fi
11195    fi
11196
11197       INTL_LIBTOOL_SUFFIX_PREFIX=
11198
11199 if test "$USE_NLS" = yes ; then
11200
11201 # Check whether --with-textdomain or --without-textdomain was given.
11202 if test "${with_textdomain+set}" = set; then
11203   withval="$with_textdomain"
11204   NLS_TEXTDOMAIN=$withval
11205 else
11206   NLS_TEXTDOMAIN=$PACKAGE
11207 fi;
11208
11209 cat >>confdefs.h <<EOF
11210 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
11211 EOF
11212
11213 fi
11214
11215 INTLDIR_MAKE=
11216 MSG_DIR_MAKE=
11217 SUB_MAKEFILE=
11218
11219 cf_makefile=makefile
11220
11221 use_our_messages=no
11222 if test "$USE_NLS" = yes ; then
11223 if test -d "$srcdir/po" ; then
11224 echo "$as_me:11224: checking if we should use included message-library" >&5
11225 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
11226
11227 # Check whether --enable-included-msgs or --disable-included-msgs was given.
11228 if test "${enable_included_msgs+set}" = set; then
11229   enableval="$enable_included_msgs"
11230   use_our_messages=$enableval
11231 else
11232   use_our_messages=yes
11233 fi;
11234 fi
11235 echo "$as_me:11235: result: $use_our_messages" >&5
11236 echo "${ECHO_T}$use_our_messages" >&6
11237 fi
11238
11239 MSG_DIR_MAKE="#"
11240 if test "$use_our_messages" = yes
11241 then
11242         SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
11243         MSG_DIR_MAKE=
11244 fi
11245
11246 if test "$USE_INCLUDED_LIBINTL" = yes ; then
11247         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11248                 :
11249         elif test "$nls_cv_use_gnu_gettext" = yes ; then
11250                 :
11251         else
11252                 INTLDIR_MAKE="#"
11253         fi
11254         if test -z "$INTLDIR_MAKE"; then
11255
11256 cat >>confdefs.h <<\EOF
11257 #define HAVE_LIBGETTEXT_H 1
11258 EOF
11259
11260                 for cf_makefile in \
11261                         $srcdir/intl/Makefile.in \
11262                         $srcdir/intl/makefile.in
11263                 do
11264                         if test -f "$cf_makefile" ; then
11265                                 SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
11266                                 break
11267                         fi
11268                 done
11269         fi
11270 else
11271         INTLDIR_MAKE="#"
11272         if test "$USE_NLS" = yes ; then
11273
11274 for ac_header in libintl.h
11275 do
11276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11277 echo "$as_me:11277: checking for $ac_header" >&5
11278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11280   echo $ECHO_N "(cached) $ECHO_C" >&6
11281 else
11282   cat >"conftest.$ac_ext" <<_ACEOF
11283 #line 11283 "configure"
11284 #include "confdefs.h"
11285 #include <$ac_header>
11286 _ACEOF
11287 if { (eval echo "$as_me:11287: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11288   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11289   ac_status=$?
11290   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11291   rm -f conftest.er1
11292   cat conftest.err >&5
11293   echo "$as_me:11293: \$? = $ac_status" >&5
11294   (exit "$ac_status"); } >/dev/null; then
11295   if test -s conftest.err; then
11296     ac_cpp_err=$ac_c_preproc_warn_flag
11297   else
11298     ac_cpp_err=
11299   fi
11300 else
11301   ac_cpp_err=yes
11302 fi
11303 if test -z "$ac_cpp_err"; then
11304   eval "$as_ac_Header=yes"
11305 else
11306   echo "$as_me: failed program was:" >&5
11307   cat "conftest.$ac_ext" >&5
11308   eval "$as_ac_Header=no"
11309 fi
11310 rm -f conftest.err "conftest.$ac_ext"
11311 fi
11312 echo "$as_me:11312: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11313 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11314 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11315   cat >>confdefs.h <<EOF
11316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11317 EOF
11318
11319 fi
11320 done
11321
11322         fi
11323 fi
11324
11325 if test -z "$INTLDIR_MAKE" ; then
11326
11327         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11328         CPPFLAGS="${CPPFLAGS}-I../intl"
11329
11330 fi
11331
11332 if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
11333         GT_YES="#"
11334         GT_NO=
11335 else
11336         GT_YES=
11337         GT_NO="#"
11338 fi
11339
11340 if test "$USE_INCLUDED_LIBINTL" = yes ; then
11341         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11342
11343 cat >>confdefs.h <<\EOF
11344 #define HAVE_GETTEXT 1
11345 EOF
11346
11347         elif test "$nls_cv_use_gnu_gettext" = yes ; then
11348
11349 cat >>confdefs.h <<\EOF
11350 #define HAVE_GETTEXT 1
11351 EOF
11352
11353         fi
11354         if test -n "$nls_cv_header_intl" ; then
11355
11356 cat >>confdefs.h <<\EOF
11357 #define HAVE_LIBINTL_H 1
11358 EOF
11359
11360         fi
11361 fi
11362
11363 echo "$as_me:11363: checking if -lm needed for math functions" >&5
11364 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11365 if test "${cf_cv_need_libm+set}" = set; then
11366   echo $ECHO_N "(cached) $ECHO_C" >&6
11367 else
11368
11369         cat >"conftest.$ac_ext" <<_ACEOF
11370 #line 11370 "configure"
11371 #include "confdefs.h"
11372
11373         #include <stdio.h>
11374         #include <stdlib.h>
11375         #include <math.h>
11376
11377 int
11378 main (void)
11379 {
11380 double x = rand(); printf("result = %g\\n", sqrt(x))
11381   ;
11382   return 0;
11383 }
11384 _ACEOF
11385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11386 if { (eval echo "$as_me:11386: \"$ac_link\"") >&5
11387   (eval $ac_link) 2>&5
11388   ac_status=$?
11389   echo "$as_me:11389: \$? = $ac_status" >&5
11390   (exit "$ac_status"); } &&
11391          { ac_try='test -s "conftest$ac_exeext"'
11392   { (eval echo "$as_me:11392: \"$ac_try\"") >&5
11393   (eval $ac_try) 2>&5
11394   ac_status=$?
11395   echo "$as_me:11395: \$? = $ac_status" >&5
11396   (exit "$ac_status"); }; }; then
11397   cf_cv_need_libm=no
11398 else
11399   echo "$as_me: failed program was:" >&5
11400 cat "conftest.$ac_ext" >&5
11401 cf_cv_need_libm=yes
11402 fi
11403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11404 fi
11405 echo "$as_me:11405: result: $cf_cv_need_libm" >&5
11406 echo "${ECHO_T}$cf_cv_need_libm" >&6
11407 if test "$cf_cv_need_libm" = yes
11408 then
11409
11410 cf_add_libs="$LIBS"
11411 # reverse order
11412 cf_add_0lib=
11413 for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11414 # filter duplicates
11415 for cf_add_1lib in $cf_add_0lib; do
11416         for cf_add_2lib in $cf_add_libs; do
11417                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11418                         cf_add_1lib=
11419                         break
11420                 fi
11421         done
11422         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11423 done
11424 LIBS="$cf_add_libs"
11425
11426 fi
11427
11428 echo "$as_me:11428: checking if you want to use dmalloc for testing" >&5
11429 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11430
11431 # Check whether --with-dmalloc or --without-dmalloc was given.
11432 if test "${with_dmalloc+set}" = set; then
11433   withval="$with_dmalloc"
11434
11435 cat >>confdefs.h <<EOF
11436 #define USE_DMALLOC 1
11437 EOF
11438
11439         : "${with_cflags:=-g}"
11440         : "${enable_leaks:=no}"
11441          with_dmalloc=yes
11442 else
11443   with_dmalloc=
11444 fi;
11445 echo "$as_me:11445: result: ${with_dmalloc:-no}" >&5
11446 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11447
11448 case ".$with_cflags" in
11449 (.*-g*)
11450         case .$CFLAGS in
11451         (.*-g*)
11452                 ;;
11453         (*)
11454
11455 cf_fix_cppflags=no
11456 cf_new_cflags=
11457 cf_new_cppflags=
11458 cf_new_extra_cppflags=
11459
11460 for cf_add_cflags in -g
11461 do
11462 case "$cf_fix_cppflags" in
11463 (no)
11464         case "$cf_add_cflags" in
11465         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11466                 case "$cf_add_cflags" in
11467                 (-D*)
11468                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11469
11470                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11471                                 && test -z "${cf_tst_cflags}" \
11472                                 && cf_fix_cppflags=yes
11473
11474                         if test "$cf_fix_cppflags" = yes ; then
11475
11476         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11477         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11478
11479                                 continue
11480                         elif test "${cf_tst_cflags}" = "\"'" ; then
11481
11482         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11483         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11484
11485                                 continue
11486                         fi
11487                         ;;
11488                 esac
11489                 case "$CPPFLAGS" in
11490                 (*$cf_add_cflags)
11491                         ;;
11492                 (*)
11493                         case "$cf_add_cflags" in
11494                         (-D*)
11495                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11496
11497 CPPFLAGS=`echo "$CPPFLAGS" | \
11498         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11499                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11500
11501                                 ;;
11502                         esac
11503
11504         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11505         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11506
11507                         ;;
11508                 esac
11509                 ;;
11510         (*)
11511
11512         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11513         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11514
11515                 ;;
11516         esac
11517         ;;
11518 (yes)
11519
11520         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11521         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11522
11523         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11524
11525         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11526                 && test -z "${cf_tst_cflags}" \
11527                 && cf_fix_cppflags=no
11528         ;;
11529 esac
11530 done
11531
11532 if test -n "$cf_new_cflags" ; then
11533
11534         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11535         CFLAGS="${CFLAGS}$cf_new_cflags"
11536
11537 fi
11538
11539 if test -n "$cf_new_cppflags" ; then
11540
11541         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11542         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11543
11544 fi
11545
11546 if test -n "$cf_new_extra_cppflags" ; then
11547
11548         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11549         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11550
11551 fi
11552
11553                 ;;
11554         esac
11555         ;;
11556 esac
11557
11558 if test "$with_dmalloc" = yes ; then
11559         echo "$as_me:11559: checking for dmalloc.h" >&5
11560 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11561 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >"conftest.$ac_ext" <<_ACEOF
11565 #line 11565 "configure"
11566 #include "confdefs.h"
11567 #include <dmalloc.h>
11568 _ACEOF
11569 if { (eval echo "$as_me:11569: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11570   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11571   ac_status=$?
11572   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11573   rm -f conftest.er1
11574   cat conftest.err >&5
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit "$ac_status"); } >/dev/null; then
11577   if test -s conftest.err; then
11578     ac_cpp_err=$ac_c_preproc_warn_flag
11579   else
11580     ac_cpp_err=
11581   fi
11582 else
11583   ac_cpp_err=yes
11584 fi
11585 if test -z "$ac_cpp_err"; then
11586   ac_cv_header_dmalloc_h=yes
11587 else
11588   echo "$as_me: failed program was:" >&5
11589   cat "conftest.$ac_ext" >&5
11590   ac_cv_header_dmalloc_h=no
11591 fi
11592 rm -f conftest.err "conftest.$ac_ext"
11593 fi
11594 echo "$as_me:11594: result: $ac_cv_header_dmalloc_h" >&5
11595 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11596 if test "$ac_cv_header_dmalloc_h" = yes; then
11597
11598 echo "$as_me:11598: checking for dmalloc_debug in -ldmalloc" >&5
11599 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11600 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11601   echo $ECHO_N "(cached) $ECHO_C" >&6
11602 else
11603   ac_check_lib_save_LIBS=$LIBS
11604 LIBS="-ldmalloc  $LIBS"
11605 cat >"conftest.$ac_ext" <<_ACEOF
11606 #line 11606 "configure"
11607 #include "confdefs.h"
11608
11609 /* Override any gcc2 internal prototype to avoid an error.  */
11610 #ifdef __cplusplus
11611 extern "C"
11612 #endif
11613 /* We use char because int might match the return type of a gcc2
11614    builtin and then its argument prototype would still apply.  */
11615 char dmalloc_debug ();
11616 int
11617 main (void)
11618 {
11619 dmalloc_debug ();
11620   ;
11621   return 0;
11622 }
11623 _ACEOF
11624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11625 if { (eval echo "$as_me:11625: \"$ac_link\"") >&5
11626   (eval $ac_link) 2>&5
11627   ac_status=$?
11628   echo "$as_me:11628: \$? = $ac_status" >&5
11629   (exit "$ac_status"); } &&
11630          { ac_try='test -s "conftest$ac_exeext"'
11631   { (eval echo "$as_me:11631: \"$ac_try\"") >&5
11632   (eval $ac_try) 2>&5
11633   ac_status=$?
11634   echo "$as_me:11634: \$? = $ac_status" >&5
11635   (exit "$ac_status"); }; }; then
11636   ac_cv_lib_dmalloc_dmalloc_debug=yes
11637 else
11638   echo "$as_me: failed program was:" >&5
11639 cat "conftest.$ac_ext" >&5
11640 ac_cv_lib_dmalloc_dmalloc_debug=no
11641 fi
11642 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11643 LIBS=$ac_check_lib_save_LIBS
11644 fi
11645 echo "$as_me:11645: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11646 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11647 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
11648   cat >>confdefs.h <<EOF
11649 #define HAVE_LIBDMALLOC 1
11650 EOF
11651
11652   LIBS="-ldmalloc $LIBS"
11653
11654 fi
11655
11656 fi
11657
11658 fi
11659
11660 echo "$as_me:11660: checking if you want to use dbmalloc for testing" >&5
11661 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11662
11663 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11664 if test "${with_dbmalloc+set}" = set; then
11665   withval="$with_dbmalloc"
11666
11667 cat >>confdefs.h <<EOF
11668 #define USE_DBMALLOC 1
11669 EOF
11670
11671         : "${with_cflags:=-g}"
11672         : "${enable_leaks:=no}"
11673          with_dbmalloc=yes
11674 else
11675   with_dbmalloc=
11676 fi;
11677 echo "$as_me:11677: result: ${with_dbmalloc:-no}" >&5
11678 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11679
11680 case ".$with_cflags" in
11681 (.*-g*)
11682         case .$CFLAGS in
11683         (.*-g*)
11684                 ;;
11685         (*)
11686
11687 cf_fix_cppflags=no
11688 cf_new_cflags=
11689 cf_new_cppflags=
11690 cf_new_extra_cppflags=
11691
11692 for cf_add_cflags in -g
11693 do
11694 case "$cf_fix_cppflags" in
11695 (no)
11696         case "$cf_add_cflags" in
11697         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11698                 case "$cf_add_cflags" in
11699                 (-D*)
11700                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11701
11702                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11703                                 && test -z "${cf_tst_cflags}" \
11704                                 && cf_fix_cppflags=yes
11705
11706                         if test "$cf_fix_cppflags" = yes ; then
11707
11708         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11709         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11710
11711                                 continue
11712                         elif test "${cf_tst_cflags}" = "\"'" ; then
11713
11714         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11715         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11716
11717                                 continue
11718                         fi
11719                         ;;
11720                 esac
11721                 case "$CPPFLAGS" in
11722                 (*$cf_add_cflags)
11723                         ;;
11724                 (*)
11725                         case "$cf_add_cflags" in
11726                         (-D*)
11727                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11728
11729 CPPFLAGS=`echo "$CPPFLAGS" | \
11730         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11731                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11732
11733                                 ;;
11734                         esac
11735
11736         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11737         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11738
11739                         ;;
11740                 esac
11741                 ;;
11742         (*)
11743
11744         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11745         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11746
11747                 ;;
11748         esac
11749         ;;
11750 (yes)
11751
11752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11754
11755         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11756
11757         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11758                 && test -z "${cf_tst_cflags}" \
11759                 && cf_fix_cppflags=no
11760         ;;
11761 esac
11762 done
11763
11764 if test -n "$cf_new_cflags" ; then
11765
11766         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11767         CFLAGS="${CFLAGS}$cf_new_cflags"
11768
11769 fi
11770
11771 if test -n "$cf_new_cppflags" ; then
11772
11773         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11774         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11775
11776 fi
11777
11778 if test -n "$cf_new_extra_cppflags" ; then
11779
11780         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11781         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11782
11783 fi
11784
11785                 ;;
11786         esac
11787         ;;
11788 esac
11789
11790 if test "$with_dbmalloc" = yes ; then
11791         echo "$as_me:11791: checking for dbmalloc.h" >&5
11792 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11793 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11794   echo $ECHO_N "(cached) $ECHO_C" >&6
11795 else
11796   cat >"conftest.$ac_ext" <<_ACEOF
11797 #line 11797 "configure"
11798 #include "confdefs.h"
11799 #include <dbmalloc.h>
11800 _ACEOF
11801 if { (eval echo "$as_me:11801: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11802   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11803   ac_status=$?
11804   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11805   rm -f conftest.er1
11806   cat conftest.err >&5
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit "$ac_status"); } >/dev/null; then
11809   if test -s conftest.err; then
11810     ac_cpp_err=$ac_c_preproc_warn_flag
11811   else
11812     ac_cpp_err=
11813   fi
11814 else
11815   ac_cpp_err=yes
11816 fi
11817 if test -z "$ac_cpp_err"; then
11818   ac_cv_header_dbmalloc_h=yes
11819 else
11820   echo "$as_me: failed program was:" >&5
11821   cat "conftest.$ac_ext" >&5
11822   ac_cv_header_dbmalloc_h=no
11823 fi
11824 rm -f conftest.err "conftest.$ac_ext"
11825 fi
11826 echo "$as_me:11826: result: $ac_cv_header_dbmalloc_h" >&5
11827 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11828 if test "$ac_cv_header_dbmalloc_h" = yes; then
11829
11830 echo "$as_me:11830: checking for debug_malloc in -ldbmalloc" >&5
11831 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11832 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   ac_check_lib_save_LIBS=$LIBS
11836 LIBS="-ldbmalloc  $LIBS"
11837 cat >"conftest.$ac_ext" <<_ACEOF
11838 #line 11838 "configure"
11839 #include "confdefs.h"
11840
11841 /* Override any gcc2 internal prototype to avoid an error.  */
11842 #ifdef __cplusplus
11843 extern "C"
11844 #endif
11845 /* We use char because int might match the return type of a gcc2
11846    builtin and then its argument prototype would still apply.  */
11847 char debug_malloc ();
11848 int
11849 main (void)
11850 {
11851 debug_malloc ();
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11857 if { (eval echo "$as_me:11857: \"$ac_link\"") >&5
11858   (eval $ac_link) 2>&5
11859   ac_status=$?
11860   echo "$as_me:11860: \$? = $ac_status" >&5
11861   (exit "$ac_status"); } &&
11862          { ac_try='test -s "conftest$ac_exeext"'
11863   { (eval echo "$as_me:11863: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:11866: \$? = $ac_status" >&5
11867   (exit "$ac_status"); }; }; then
11868   ac_cv_lib_dbmalloc_debug_malloc=yes
11869 else
11870   echo "$as_me: failed program was:" >&5
11871 cat "conftest.$ac_ext" >&5
11872 ac_cv_lib_dbmalloc_debug_malloc=no
11873 fi
11874 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11875 LIBS=$ac_check_lib_save_LIBS
11876 fi
11877 echo "$as_me:11877: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11878 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11879 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
11880   cat >>confdefs.h <<EOF
11881 #define HAVE_LIBDBMALLOC 1
11882 EOF
11883
11884   LIBS="-ldbmalloc $LIBS"
11885
11886 fi
11887
11888 fi
11889
11890 fi
11891
11892 echo "$as_me:11892: checking if you want to use purify for testing" >&5
11893 echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
11894
11895 # Check whether --with-purify or --without-purify was given.
11896 if test "${with_purify+set}" = set; then
11897   withval="$with_purify"
11898
11899 cat >>confdefs.h <<EOF
11900 #define USE_PURIFY 1
11901 EOF
11902
11903         : "${with_cflags:=-g}"
11904         : "${enable_leaks:=no}"
11905          with_purify=yes
11906 else
11907   with_purify=
11908 fi;
11909 echo "$as_me:11909: result: ${with_purify:-no}" >&5
11910 echo "${ECHO_T}${with_purify:-no}" >&6
11911
11912 case ".$with_cflags" in
11913 (.*-g*)
11914         case .$CFLAGS in
11915         (.*-g*)
11916                 ;;
11917         (*)
11918
11919 cf_fix_cppflags=no
11920 cf_new_cflags=
11921 cf_new_cppflags=
11922 cf_new_extra_cppflags=
11923
11924 for cf_add_cflags in -g
11925 do
11926 case "$cf_fix_cppflags" in
11927 (no)
11928         case "$cf_add_cflags" in
11929         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11930                 case "$cf_add_cflags" in
11931                 (-D*)
11932                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11933
11934                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11935                                 && test -z "${cf_tst_cflags}" \
11936                                 && cf_fix_cppflags=yes
11937
11938                         if test "$cf_fix_cppflags" = yes ; then
11939
11940         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11941         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11942
11943                                 continue
11944                         elif test "${cf_tst_cflags}" = "\"'" ; then
11945
11946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11948
11949                                 continue
11950                         fi
11951                         ;;
11952                 esac
11953                 case "$CPPFLAGS" in
11954                 (*$cf_add_cflags)
11955                         ;;
11956                 (*)
11957                         case "$cf_add_cflags" in
11958                         (-D*)
11959                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11960
11961 CPPFLAGS=`echo "$CPPFLAGS" | \
11962         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11963                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11964
11965                                 ;;
11966                         esac
11967
11968         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11969         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11970
11971                         ;;
11972                 esac
11973                 ;;
11974         (*)
11975
11976         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11977         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11978
11979                 ;;
11980         esac
11981         ;;
11982 (yes)
11983
11984         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11985         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11986
11987         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11988
11989         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11990                 && test -z "${cf_tst_cflags}" \
11991                 && cf_fix_cppflags=no
11992         ;;
11993 esac
11994 done
11995
11996 if test -n "$cf_new_cflags" ; then
11997
11998         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11999         CFLAGS="${CFLAGS}$cf_new_cflags"
12000
12001 fi
12002
12003 if test -n "$cf_new_cppflags" ; then
12004
12005         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12006         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12007
12008 fi
12009
12010 if test -n "$cf_new_extra_cppflags" ; then
12011
12012         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12013         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12014
12015 fi
12016
12017                 ;;
12018         esac
12019         ;;
12020 esac
12021
12022 echo "$as_me:12022: checking if you want to use valgrind for testing" >&5
12023 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12024
12025 # Check whether --with-valgrind or --without-valgrind was given.
12026 if test "${with_valgrind+set}" = set; then
12027   withval="$with_valgrind"
12028
12029 cat >>confdefs.h <<EOF
12030 #define USE_VALGRIND 1
12031 EOF
12032
12033         : "${with_cflags:=-g}"
12034         : "${enable_leaks:=no}"
12035          with_valgrind=yes
12036 else
12037   with_valgrind=
12038 fi;
12039 echo "$as_me:12039: result: ${with_valgrind:-no}" >&5
12040 echo "${ECHO_T}${with_valgrind:-no}" >&6
12041
12042 case ".$with_cflags" in
12043 (.*-g*)
12044         case .$CFLAGS in
12045         (.*-g*)
12046                 ;;
12047         (*)
12048
12049 cf_fix_cppflags=no
12050 cf_new_cflags=
12051 cf_new_cppflags=
12052 cf_new_extra_cppflags=
12053
12054 for cf_add_cflags in -g
12055 do
12056 case "$cf_fix_cppflags" in
12057 (no)
12058         case "$cf_add_cflags" in
12059         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12060                 case "$cf_add_cflags" in
12061                 (-D*)
12062                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12063
12064                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12065                                 && test -z "${cf_tst_cflags}" \
12066                                 && cf_fix_cppflags=yes
12067
12068                         if test "$cf_fix_cppflags" = yes ; then
12069
12070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12072
12073                                 continue
12074                         elif test "${cf_tst_cflags}" = "\"'" ; then
12075
12076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12078
12079                                 continue
12080                         fi
12081                         ;;
12082                 esac
12083                 case "$CPPFLAGS" in
12084                 (*$cf_add_cflags)
12085                         ;;
12086                 (*)
12087                         case "$cf_add_cflags" in
12088                         (-D*)
12089                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12090
12091 CPPFLAGS=`echo "$CPPFLAGS" | \
12092         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12093                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12094
12095                                 ;;
12096                         esac
12097
12098         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12099         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12100
12101                         ;;
12102                 esac
12103                 ;;
12104         (*)
12105
12106         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12107         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12108
12109                 ;;
12110         esac
12111         ;;
12112 (yes)
12113
12114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12116
12117         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12118
12119         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12120                 && test -z "${cf_tst_cflags}" \
12121                 && cf_fix_cppflags=no
12122         ;;
12123 esac
12124 done
12125
12126 if test -n "$cf_new_cflags" ; then
12127
12128         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12129         CFLAGS="${CFLAGS}$cf_new_cflags"
12130
12131 fi
12132
12133 if test -n "$cf_new_cppflags" ; then
12134
12135         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12136         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12137
12138 fi
12139
12140 if test -n "$cf_new_extra_cppflags" ; then
12141
12142         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12143         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12144
12145 fi
12146
12147                 ;;
12148         esac
12149         ;;
12150 esac
12151
12152 echo "$as_me:12152: checking if you want to perform memory-leak testing" >&5
12153 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12154
12155 # Check whether --with-no-leaks or --without-no-leaks was given.
12156 if test "${with_no_leaks+set}" = set; then
12157   withval="$with_no_leaks"
12158
12159 cat >>confdefs.h <<\EOF
12160 #define NO_LEAKS 1
12161 EOF
12162
12163          cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
12164          case ${cf_doalloc} in
12165          (*yes*) ;;
12166          (*)
12167 cat >>confdefs.h <<\EOF
12168 #define DOALLOC 10000
12169 EOF
12170  ;;
12171          esac
12172          enable_leaks=no
12173 else
12174   enable_leaks=yes
12175 fi;
12176 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12177 echo "$as_me:12177: result: $with_no_leaks" >&5
12178 echo "${ECHO_T}$with_no_leaks" >&6
12179
12180 echo "$as_me:12180: checking if you want --trace option" >&5
12181 echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
12182
12183 # Check whether --enable-trace or --disable-trace was given.
12184 if test "${enable_trace+set}" = set; then
12185   enableval="$enable_trace"
12186
12187 else
12188   enableval=yes
12189 fi;
12190 echo "$as_me:12190: result: $enableval" >&5
12191 echo "${ECHO_T}$enableval" >&6
12192 if test "$enableval" != no ; then
12193 EXTRAOBJS="$EXTRAOBJS trace\$o"
12194
12195 cat >>confdefs.h <<\EOF
12196 #define HAVE_DLG_TRACE 1
12197 EOF
12198
12199 else
12200         :
12201 fi
12202
12203 echo "$as_me:12203: checking if rpath option should be used" >&5
12204 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
12205
12206 # Check whether --enable-rpath or --disable-rpath was given.
12207 if test "${enable_rpath+set}" = set; then
12208   enableval="$enable_rpath"
12209   cf_cv_enable_rpath=$enableval
12210 else
12211   cf_cv_enable_rpath=no
12212 fi;
12213 echo "$as_me:12213: result: $cf_cv_enable_rpath" >&5
12214 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
12215
12216 LD_RPATH_OPT=
12217 if test "x$cf_cv_enable_rpath" != xno
12218 then
12219         echo "$as_me:12219: checking for an rpath option" >&5
12220 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
12221         case "$cf_cv_system_name" in
12222         (irix*)
12223                 if test "$GCC" = yes; then
12224                         LD_RPATH_OPT="-Wl,-rpath,"
12225                 else
12226                         LD_RPATH_OPT="-rpath "
12227                 fi
12228                 ;;
12229         (linux*|gnu*|k*bsd*-gnu|freebsd*)
12230                 LD_RPATH_OPT="-Wl,-rpath,"
12231                 ;;
12232         (openbsd[2-9].*|mirbsd*)
12233                 LD_RPATH_OPT="-Wl,-rpath,"
12234                 ;;
12235         (dragonfly*)
12236                 LD_RPATH_OPT="-rpath "
12237                 ;;
12238         (netbsd*)
12239                 LD_RPATH_OPT="-Wl,-rpath,"
12240                 ;;
12241         (osf*|mls+*)
12242                 LD_RPATH_OPT="-rpath "
12243                 ;;
12244         (solaris2*)
12245                 LD_RPATH_OPT="-R"
12246                 ;;
12247         (*)
12248                 ;;
12249         esac
12250         echo "$as_me:12250: result: $LD_RPATH_OPT" >&5
12251 echo "${ECHO_T}$LD_RPATH_OPT" >&6
12252
12253         case "x$LD_RPATH_OPT" in
12254         (x-R*)
12255                 echo "$as_me:12255: checking if we need a space after rpath option" >&5
12256 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
12257                 cf_save_LIBS="$LIBS"
12258
12259 cf_add_libs="$LIBS"
12260 # reverse order
12261 cf_add_0lib=
12262 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12263 # filter duplicates
12264 for cf_add_1lib in $cf_add_0lib; do
12265         for cf_add_2lib in $cf_add_libs; do
12266                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12267                         cf_add_1lib=
12268                         break
12269                 fi
12270         done
12271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12272 done
12273 LIBS="$cf_add_libs"
12274
12275                 cat >"conftest.$ac_ext" <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278
12279 int
12280 main (void)
12281 {
12282
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12288 if { (eval echo "$as_me:12288: \"$ac_link\"") >&5
12289   (eval $ac_link) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit "$ac_status"); } &&
12293          { ac_try='test -s "conftest$ac_exeext"'
12294   { (eval echo "$as_me:12294: \"$ac_try\"") >&5
12295   (eval $ac_try) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit "$ac_status"); }; }; then
12299   cf_rpath_space=no
12300 else
12301   echo "$as_me: failed program was:" >&5
12302 cat "conftest.$ac_ext" >&5
12303 cf_rpath_space=yes
12304 fi
12305 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12306                 LIBS="$cf_save_LIBS"
12307                 echo "$as_me:12307: result: $cf_rpath_space" >&5
12308 echo "${ECHO_T}$cf_rpath_space" >&6
12309                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
12310                 ;;
12311         esac
12312 fi
12313
12314 REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
12315 ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
12316 cf_cv_rel_version=$REL_VERSION
12317
12318 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
12319
12320 # Check whether --with-rel-version or --without-rel-version was given.
12321 if test "${with_rel_version+set}" = set; then
12322   withval="$with_rel_version"
12323   { echo "$as_me:12323: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
12324 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
12325  cf_cv_rel_version=$withval
12326 fi;
12327
12328  DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
12329  DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
12330
12331 if test -n "$DIALOG_MAJOR" ; then
12332   case $DIALOG_MAJOR in
12333   ([0-9]*)
12334         ;;
12335   (*)
12336         { { echo "$as_me:12336: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
12337 echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
12338    { (exit 1); exit 1; }; }
12339         ;;
12340   esac
12341 else
12342   { { echo "$as_me:12342: error: Release major-version value is empty" >&5
12343 echo "$as_me: error: Release major-version value is empty" >&2;}
12344    { (exit 1); exit 1; }; }
12345 fi
12346
12347 if test -n "$DIALOG_MINOR" ; then
12348   case $DIALOG_MINOR in
12349   ([0-9]*)
12350         ;;
12351   (*)
12352         { { echo "$as_me:12352: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
12353 echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
12354    { (exit 1); exit 1; }; }
12355         ;;
12356   esac
12357 else
12358   { { echo "$as_me:12358: error: Release minor-version value is empty" >&5
12359 echo "$as_me: error: Release minor-version value is empty" >&2;}
12360    { (exit 1); exit 1; }; }
12361 fi
12362
12363 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
12364
12365 # Check whether --with-abi-version or --without-abi-version was given.
12366 if test "${with_abi_version+set}" = set; then
12367   withval="$with_abi_version"
12368
12369         if test "x$cf_cv_abi_version" != "x$withval"
12370         then
12371                 { echo "$as_me:12371: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
12372 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
12373                 case "$cf_cv_rel_version" in
12374                 (5.*)
12375                         cf_cv_rel_version=$withval.0
12376                         ;;
12377                 (6.*)
12378                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
12379                         ;;
12380                 esac
12381         fi
12382         cf_cv_abi_version=$withval
12383 fi;
12384
12385 if test -n "$cf_cv_abi_version" ; then
12386   case $cf_cv_abi_version in
12387   ([0-9]*)
12388         ;;
12389   (*)
12390         { { echo "$as_me:12390: error: ABI version is not a number: $cf_cv_abi_version" >&5
12391 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
12392    { (exit 1); exit 1; }; }
12393         ;;
12394   esac
12395 else
12396   { { echo "$as_me:12396: error: ABI version value is empty" >&5
12397 echo "$as_me: error: ABI version value is empty" >&2;}
12398    { (exit 1); exit 1; }; }
12399 fi
12400
12401 LIB_MODEL=static
12402 DFT_LWR_MODEL=$LIB_MODEL
12403 LIBTOOL_MAKE="#"
12404
12405 # use to comment-out makefile lines
12406 MAKE_NORMAL=
12407 MAKE_STATIC=
12408 MAKE_SHARED="#"
12409 MAKE_DLLS="#"
12410
12411 shlibdir=$libdir
12412
12413 echo "$as_me:12413: checking if libtool -version-number should be used" >&5
12414 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
12415
12416 # Check whether --enable-libtool-version or --disable-libtool-version was given.
12417 if test "${enable_libtool_version+set}" = set; then
12418   enableval="$enable_libtool_version"
12419   test "$enableval" != no && enableval=yes
12420         if test "$enableval" != "yes" ; then
12421     cf_libtool_version=no
12422         else
12423                 cf_libtool_version=yes
12424         fi
12425 else
12426   enableval=yes
12427         cf_libtool_version=yes
12428
12429 fi;
12430 echo "$as_me:12430: result: $cf_libtool_version" >&5
12431 echo "${ECHO_T}$cf_libtool_version" >&6
12432
12433 if test "$cf_libtool_version" = yes ; then
12434         LIBTOOL_VERSION="-version-number"
12435 else
12436         LIBTOOL_VERSION="-version-info"
12437         case "x$VERSION" in
12438         (x)
12439                 { echo "$as_me:12439: WARNING: VERSION was not set" >&5
12440 echo "$as_me: WARNING: VERSION was not set" >&2;}
12441                 ;;
12442         (x*.*.*)
12443                 ABI_VERSION="$VERSION"
12444                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
12445
12446 echo "${as_me:-configure}:12446: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12447
12448                 ;;
12449         (x*:*:*)
12450                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
12451                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
12452
12453 echo "${as_me:-configure}:12453: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12454
12455                 ;;
12456         (*)
12457                 { echo "$as_me:12457: WARNING: unexpected VERSION value: $VERSION" >&5
12458 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
12459                 ;;
12460         esac
12461 fi
12462
12463 LIBTOOL=
12464
12465 # common library maintenance symbols that are convenient for libtool scripts:
12466 LIB_CREATE='${AR} -cr'
12467 LIB_OBJECT='${OBJECTS}'
12468 LIB_SUFFIX=.a
12469 LIB_PREP="$RANLIB"
12470
12471 # symbols used to prop libtool up to enable it to determine what it should be
12472 # doing:
12473 LIB_CLEAN=
12474 LIB_COMPILE=
12475 LIB_LINK='${CC}'
12476 LIB_INSTALL=
12477 LIB_UNINSTALL=
12478
12479 echo "$as_me:12479: checking if you want to build libraries with libtool" >&5
12480 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
12481
12482 # Check whether --with-libtool or --without-libtool was given.
12483 if test "${with_libtool+set}" = set; then
12484   withval="$with_libtool"
12485   with_libtool=$withval
12486 else
12487   with_libtool=no
12488 fi;
12489 echo "$as_me:12489: result: $with_libtool" >&5
12490 echo "${ECHO_T}$with_libtool" >&6
12491 if test "$with_libtool" != "no"; then
12492
12493         if test "$with_libtool" != "yes" ; then
12494
12495 if test "x$prefix" != xNONE; then
12496         cf_path_syntax="$prefix"
12497 else
12498         cf_path_syntax="$ac_default_prefix"
12499 fi
12500
12501 case ".$with_libtool" in
12502 (.\$\(*\)*|.\'*\'*)
12503         ;;
12504 (..|./*|.\\*)
12505         ;;
12506 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12507         ;;
12508 (.\$\{*prefix\}*|.\$\{*dir\}*)
12509         eval with_libtool="$with_libtool"
12510         case ".$with_libtool" in
12511         (.NONE/*)
12512                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12513                 ;;
12514         esac
12515         ;;
12516 (.no|.NONE/*)
12517         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12518         ;;
12519 (*)
12520         { { echo "$as_me:12520: error: expected a pathname, not \"$with_libtool\"" >&5
12521 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
12522    { (exit 1); exit 1; }; }
12523         ;;
12524 esac
12525
12526                 LIBTOOL=$with_libtool
12527         else
12528                 if test -n "$ac_tool_prefix"; then
12529   for ac_prog in libtool glibtool
12530   do
12531     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12532 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12533 echo "$as_me:12533: checking for $ac_word" >&5
12534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12535 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12536   echo $ECHO_N "(cached) $ECHO_C" >&6
12537 else
12538   if test -n "$LIBTOOL"; then
12539   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12540 else
12541   ac_save_IFS=$IFS; IFS=$ac_path_separator
12542 ac_dummy="$PATH"
12543 for ac_dir in $ac_dummy; do
12544   IFS=$ac_save_IFS
12545   test -z "$ac_dir" && ac_dir=.
12546   $as_executable_p "$ac_dir/$ac_word" || continue
12547 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12548 echo "$as_me:12548: found $ac_dir/$ac_word" >&5
12549 break
12550 done
12551
12552 fi
12553 fi
12554 LIBTOOL=$ac_cv_prog_LIBTOOL
12555 if test -n "$LIBTOOL"; then
12556   echo "$as_me:12556: result: $LIBTOOL" >&5
12557 echo "${ECHO_T}$LIBTOOL" >&6
12558 else
12559   echo "$as_me:12559: result: no" >&5
12560 echo "${ECHO_T}no" >&6
12561 fi
12562
12563     test -n "$LIBTOOL" && break
12564   done
12565 fi
12566 if test -z "$LIBTOOL"; then
12567   ac_ct_LIBTOOL=$LIBTOOL
12568   for ac_prog in libtool glibtool
12569 do
12570   # Extract the first word of "$ac_prog", so it can be a program name with args.
12571 set dummy $ac_prog; ac_word=$2
12572 echo "$as_me:12572: checking for $ac_word" >&5
12573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12574 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12575   echo $ECHO_N "(cached) $ECHO_C" >&6
12576 else
12577   if test -n "$ac_ct_LIBTOOL"; then
12578   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12579 else
12580   ac_save_IFS=$IFS; IFS=$ac_path_separator
12581 ac_dummy="$PATH"
12582 for ac_dir in $ac_dummy; do
12583   IFS=$ac_save_IFS
12584   test -z "$ac_dir" && ac_dir=.
12585   $as_executable_p "$ac_dir/$ac_word" || continue
12586 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12587 echo "$as_me:12587: found $ac_dir/$ac_word" >&5
12588 break
12589 done
12590
12591 fi
12592 fi
12593 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12594 if test -n "$ac_ct_LIBTOOL"; then
12595   echo "$as_me:12595: result: $ac_ct_LIBTOOL" >&5
12596 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12597 else
12598   echo "$as_me:12598: result: no" >&5
12599 echo "${ECHO_T}no" >&6
12600 fi
12601
12602   test -n "$ac_ct_LIBTOOL" && break
12603 done
12604 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12605
12606   LIBTOOL=$ac_ct_LIBTOOL
12607 fi
12608
12609 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12610 then
12611         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.].*//'`
12612 else
12613         cf_cv_libtool_version=
12614 fi
12615 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12616
12617                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
12618                 then
12619
12620 unset ac_cv_prog_ac_ct_LIBTOOL
12621 unset ac_ct_LIBTOOL
12622 unset LIBTOOL
12623
12624                         if test -n "$ac_tool_prefix"; then
12625   for ac_prog in glibtool
12626   do
12627     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12628 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12629 echo "$as_me:12629: checking for $ac_word" >&5
12630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12631 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12632   echo $ECHO_N "(cached) $ECHO_C" >&6
12633 else
12634   if test -n "$LIBTOOL"; then
12635   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12636 else
12637   ac_save_IFS=$IFS; IFS=$ac_path_separator
12638 ac_dummy="$PATH"
12639 for ac_dir in $ac_dummy; do
12640   IFS=$ac_save_IFS
12641   test -z "$ac_dir" && ac_dir=.
12642   $as_executable_p "$ac_dir/$ac_word" || continue
12643 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12644 echo "$as_me:12644: found $ac_dir/$ac_word" >&5
12645 break
12646 done
12647
12648 fi
12649 fi
12650 LIBTOOL=$ac_cv_prog_LIBTOOL
12651 if test -n "$LIBTOOL"; then
12652   echo "$as_me:12652: result: $LIBTOOL" >&5
12653 echo "${ECHO_T}$LIBTOOL" >&6
12654 else
12655   echo "$as_me:12655: result: no" >&5
12656 echo "${ECHO_T}no" >&6
12657 fi
12658
12659     test -n "$LIBTOOL" && break
12660   done
12661 fi
12662 if test -z "$LIBTOOL"; then
12663   ac_ct_LIBTOOL=$LIBTOOL
12664   for ac_prog in glibtool
12665 do
12666   # Extract the first word of "$ac_prog", so it can be a program name with args.
12667 set dummy $ac_prog; ac_word=$2
12668 echo "$as_me:12668: checking for $ac_word" >&5
12669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12670 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   if test -n "$ac_ct_LIBTOOL"; then
12674   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12675 else
12676   ac_save_IFS=$IFS; IFS=$ac_path_separator
12677 ac_dummy="$PATH"
12678 for ac_dir in $ac_dummy; do
12679   IFS=$ac_save_IFS
12680   test -z "$ac_dir" && ac_dir=.
12681   $as_executable_p "$ac_dir/$ac_word" || continue
12682 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12683 echo "$as_me:12683: found $ac_dir/$ac_word" >&5
12684 break
12685 done
12686
12687 fi
12688 fi
12689 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12690 if test -n "$ac_ct_LIBTOOL"; then
12691   echo "$as_me:12691: result: $ac_ct_LIBTOOL" >&5
12692 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12693 else
12694   echo "$as_me:12694: result: no" >&5
12695 echo "${ECHO_T}no" >&6
12696 fi
12697
12698   test -n "$ac_ct_LIBTOOL" && break
12699 done
12700 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12701
12702   LIBTOOL=$ac_ct_LIBTOOL
12703 fi
12704
12705 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12706 then
12707         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.].*//'`
12708 else
12709         cf_cv_libtool_version=
12710 fi
12711 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12712
12713                 fi
12714         fi
12715         if test -z "$LIBTOOL" ; then
12716                 { { echo "$as_me:12716: error: Cannot find libtool" >&5
12717 echo "$as_me: error: Cannot find libtool" >&2;}
12718    { (exit 1); exit 1; }; }
12719         fi
12720         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
12721         LIB_OBJECT='${OBJECTS:.o=.lo}'
12722         LIB_SUFFIX=.la
12723         LIB_CLEAN='${LIBTOOL} --mode=clean'
12724         LIB_COMPILE='${LIBTOOL} --mode=compile'
12725         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
12726         LIB_INSTALL='${LIBTOOL} --mode=install'
12727         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
12728         LIB_PREP=:
12729
12730 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12731 then
12732         echo "$as_me:12732: checking version of $LIBTOOL" >&5
12733 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
12734
12735 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12736 then
12737         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.].*//'`
12738 else
12739         cf_cv_libtool_version=
12740 fi
12741 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12742
12743         echo "$as_me:12743: result: $cf_cv_libtool_version" >&5
12744 echo "${ECHO_T}$cf_cv_libtool_version" >&6
12745         if test -z "$cf_cv_libtool_version" ; then
12746                 { { echo "$as_me:12746: error: This is not GNU libtool" >&5
12747 echo "$as_me: error: This is not GNU libtool" >&2;}
12748    { (exit 1); exit 1; }; }
12749         fi
12750 else
12751         { { echo "$as_me:12751: error: GNU libtool has not been found" >&5
12752 echo "$as_me: error: GNU libtool has not been found" >&2;}
12753    { (exit 1); exit 1; }; }
12754 fi
12755
12756         # special hack to add -no-undefined (which libtool should do for itself)
12757         LT_UNDEF=
12758         case "$cf_cv_system_name" in
12759         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
12760                 LT_UNDEF=-no-undefined
12761                 ;;
12762         esac
12763
12764         # special hack to add --tag option for C++ compiler
12765         case "$cf_cv_libtool_version" in
12766         (1.[5-9]*|[2-9].[0-9.a-z]*)
12767                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
12768                 LIBTOOL="$LIBTOOL --tag=CC"
12769                 ;;
12770         (*)
12771                 LIBTOOL_CXX="$LIBTOOL"
12772                 ;;
12773         esac
12774 else
12775         LIBTOOL=""
12776         LIBTOOL_CXX=""
12777 fi
12778
12779 test -z "$LIBTOOL" && ECHO_LT=
12780
12781 LIB_CREATE="$LIB_CREATE \$@"
12782
12783 if test "$with_libtool" = "yes" ; then
12784         OBJEXT="lo"
12785         LIB_MODEL=libtool
12786         DFT_LWR_MODEL=$LIB_MODEL
12787         LIBTOOL_MAKE=
12788
12789 echo "$as_me:12789: checking for additional libtool options" >&5
12790 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
12791
12792 # Check whether --with-libtool-opts or --without-libtool-opts was given.
12793 if test "${with_libtool_opts+set}" = set; then
12794   withval="$with_libtool_opts"
12795   with_libtool_opts=$withval
12796 else
12797   with_libtool_opts=no
12798 fi;
12799 echo "$as_me:12799: result: $with_libtool_opts" >&5
12800 echo "${ECHO_T}$with_libtool_opts" >&6
12801
12802 case .$with_libtool_opts in
12803 (.yes|.no|.)
12804         ;;
12805 (*)
12806         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
12807         ;;
12808 esac
12809
12810 echo "$as_me:12810: checking if exported-symbols file should be used" >&5
12811 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
12812
12813 # Check whether --with-export-syms or --without-export-syms was given.
12814 if test "${with_export_syms+set}" = set; then
12815   withval="$with_export_syms"
12816   with_export_syms=$withval
12817 else
12818   with_export_syms=no
12819 fi;
12820 if test "x$with_export_syms" = xyes
12821 then
12822         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
12823
12824 fi
12825 echo "$as_me:12825: result: $with_export_syms" >&5
12826 echo "${ECHO_T}$with_export_syms" >&6
12827 if test "x$with_export_syms" != xno
12828 then
12829         EXPORT_SYMS="-export-symbols $with_export_syms"
12830
12831 fi
12832
12833         MAKE_NORMAL="#"
12834         MAKE_STATIC="#"
12835         MAKE_SHARED=
12836 else
12837         echo "$as_me:12837: checking if you want to build shared libraries" >&5
12838 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
12839
12840 # Check whether --with-shared or --without-shared was given.
12841 if test "${with_shared+set}" = set; then
12842   withval="$with_shared"
12843   with_shared=$withval
12844 else
12845   with_shared=no
12846 fi;
12847         echo "$as_me:12847: result: $with_shared" >&5
12848 echo "${ECHO_T}$with_shared" >&6
12849         if test "$with_shared" = "yes" ; then
12850                 LIB_MODEL=shared
12851                 DFT_LWR_MODEL=$LIB_MODEL
12852
12853         RM_SHARED_OPTS=
12854         LOCAL_LDFLAGS=
12855         LOCAL_LDFLAGS2=
12856         LD_SHARED_OPTS=
12857         INSTALL_LIB="-m 644"
12858         : ${rel_builddir:=.}
12859
12860         shlibdir=$libdir
12861
12862         MAKE_DLLS="#"
12863
12864         cf_cv_do_symlinks=no
12865         cf_ld_rpath_opt=
12866         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
12867
12868         echo "$as_me:12868: checking if release/abi version should be used for shared libs" >&5
12869 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
12870
12871 # Check whether --with-shlib-version or --without-shlib-version was given.
12872 if test "${with_shlib_version+set}" = set; then
12873   withval="$with_shlib_version"
12874   test -z "$withval" && withval=auto
12875         case "$withval" in
12876         (yes)
12877                 cf_cv_shlib_version=auto
12878                 ;;
12879         (rel|abi|auto)
12880                 cf_cv_shlib_version=$withval
12881                 ;;
12882         (*)
12883                 echo "$as_me:12883: result: $withval" >&5
12884 echo "${ECHO_T}$withval" >&6
12885                 { { echo "$as_me:12885: error: option value must be one of: rel, abi, or auto" >&5
12886 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
12887    { (exit 1); exit 1; }; }
12888                 ;;
12889         esac
12890
12891 else
12892   cf_cv_shlib_version=auto
12893 fi;
12894         echo "$as_me:12894: result: $cf_cv_shlib_version" >&5
12895 echo "${ECHO_T}$cf_cv_shlib_version" >&6
12896
12897         cf_cv_rm_so_locs=no
12898         cf_try_cflags=
12899
12900         # Some less-capable ports of gcc support only -fpic
12901         CC_SHARED_OPTS=
12902
12903         cf_try_fPIC=no
12904         if test "$GCC" = yes
12905         then
12906                 cf_try_fPIC=yes
12907         else
12908                 case "$cf_cv_system_name" in
12909                 (*linux*)       # e.g., PGI compiler
12910                         cf_try_fPIC=yes
12911                         ;;
12912                 esac
12913         fi
12914
12915         if test "$cf_try_fPIC" = yes
12916         then
12917                 echo "$as_me:12917: checking which $CC option to use" >&5
12918 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
12919                 cf_save_CFLAGS="$CFLAGS"
12920                 for CC_SHARED_OPTS in -fPIC -fpic ''
12921                 do
12922                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
12923                         cat >"conftest.$ac_ext" <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926 #include <stdio.h>
12927 int
12928 main (void)
12929 {
12930 int x = 1
12931   ;
12932   return 0;
12933 }
12934 _ACEOF
12935 rm -f "conftest.$ac_objext"
12936 if { (eval echo "$as_me:12936: \"$ac_compile\"") >&5
12937   (eval $ac_compile) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit "$ac_status"); } &&
12941          { ac_try='test -s "conftest.$ac_objext"'
12942   { (eval echo "$as_me:12942: \"$ac_try\"") >&5
12943   (eval $ac_try) 2>&5
12944   ac_status=$?
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit "$ac_status"); }; }; then
12947   break
12948 else
12949   echo "$as_me: failed program was:" >&5
12950 cat "conftest.$ac_ext" >&5
12951 fi
12952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12953                 done
12954                 echo "$as_me:12954: result: $CC_SHARED_OPTS" >&5
12955 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
12956                 CFLAGS="$cf_save_CFLAGS"
12957         fi
12958
12959         cf_cv_shlib_version_infix=no
12960
12961         case "$cf_cv_system_name" in
12962         (aix4.3-9*|aix[5-7]*)
12963                 if test "$GCC" = yes; then
12964                         CC_SHARED_OPTS='-Wl,-brtl'
12965                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12966                 else
12967                         CC_SHARED_OPTS='-brtl'
12968                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
12969                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12970                 fi
12971                 ;;
12972         (beos*)
12973                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
12974                 ;;
12975         (cygwin*)
12976                 CC_SHARED_OPTS=
12977                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12978                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12979                 cf_cv_shlib_version=cygdll
12980                 cf_cv_shlib_version_infix=cygdll
12981                 shlibdir=$bindir
12982                 MAKE_DLLS=
12983                 cat >mk_shared_lib.sh <<-CF_EOF
12984                 #!$SHELL
12985                 SHARED_LIB=\$1
12986                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12987                 shift
12988                 cat <<-EOF
12989                 Linking shared library
12990                 ** SHARED_LIB \$SHARED_LIB
12991                 ** IMPORT_LIB \$IMPORT_LIB
12992 EOF
12993                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12994 CF_EOF
12995                 chmod +x mk_shared_lib.sh
12996                 ;;
12997         (msys*)
12998                 CC_SHARED_OPTS=
12999                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13000                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13001                 cf_cv_shlib_version=msysdll
13002                 cf_cv_shlib_version_infix=msysdll
13003                 shlibdir=$bindir
13004                 MAKE_DLLS=
13005                 cat >mk_shared_lib.sh <<-CF_EOF
13006                 #!$SHELL
13007                 SHARED_LIB=\$1
13008                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
13009                 shift
13010                 cat <<-EOF
13011                 Linking shared library
13012                 ** SHARED_LIB \$SHARED_LIB
13013                 ** IMPORT_LIB \$IMPORT_LIB
13014 EOF
13015                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13016 CF_EOF
13017                 chmod +x mk_shared_lib.sh
13018                 ;;
13019         (darwin*)
13020                 cf_try_cflags="no-cpp-precomp"
13021                 CC_SHARED_OPTS="-dynamic"
13022                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
13023                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
13024                 cf_cv_shlib_version_infix=yes
13025                 echo "$as_me:13025: checking if ld -search_paths_first works" >&5
13026 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
13027 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
13028   echo $ECHO_N "(cached) $ECHO_C" >&6
13029 else
13030
13031                         cf_save_LDFLAGS=$LDFLAGS
13032                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13033                         cat >"conftest.$ac_ext" <<_ACEOF
13034 #line 13034 "configure"
13035 #include "confdefs.h"
13036
13037 int
13038 main (void)
13039 {
13040 int i;
13041   ;
13042   return 0;
13043 }
13044 _ACEOF
13045 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13046 if { (eval echo "$as_me:13046: \"$ac_link\"") >&5
13047   (eval $ac_link) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit "$ac_status"); } &&
13051          { ac_try='test -s "conftest$ac_exeext"'
13052   { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053   (eval $ac_try) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit "$ac_status"); }; }; then
13057   cf_cv_ldflags_search_paths_first=yes
13058 else
13059   echo "$as_me: failed program was:" >&5
13060 cat "conftest.$ac_ext" >&5
13061 cf_cv_ldflags_search_paths_first=no
13062 fi
13063 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13064                                 LDFLAGS=$cf_save_LDFLAGS
13065 fi
13066 echo "$as_me:13066: result: $cf_cv_ldflags_search_paths_first" >&5
13067 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
13068                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
13069                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13070                 fi
13071                 ;;
13072         (hpux[7-8]*)
13073                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
13074                 if test "$GCC" != yes; then
13075                         CC_SHARED_OPTS='+Z'
13076                 fi
13077                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
13078                 INSTALL_LIB="-m 555"
13079                 ;;
13080         (hpux*)
13081                 # (tested with gcc 2.7.2 -- I don't have c89)
13082                 if test "$GCC" = yes; then
13083                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
13084                 else
13085                         CC_SHARED_OPTS='+Z'
13086                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
13087                 fi
13088                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
13089                 # HP-UX shared libraries must be executable, and should be
13090                 # readonly to exploit a quirk in the memory manager.
13091                 INSTALL_LIB="-m 555"
13092                 ;;
13093         (interix*)
13094                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13095                 if test "$cf_cv_shlib_version" = rel; then
13096                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13097                 else
13098                         cf_shared_soname='`basename $@`'
13099                 fi
13100                 CC_SHARED_OPTS=
13101                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
13102                 ;;
13103         (irix*)
13104                 if test "$cf_cv_enable_rpath" = yes ; then
13105                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13106                 fi
13107                 # tested with IRIX 5.2 and 'cc'.
13108                 if test "$GCC" != yes; then
13109                         CC_SHARED_OPTS='-KPIC'
13110                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
13111                 else
13112                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
13113                 fi
13114                 cf_cv_rm_so_locs=yes
13115                 ;;
13116         (linux*|gnu*|k*bsd*-gnu)
13117                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13118                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13119                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13120                 fi
13121                 if test "$cf_cv_enable_rpath" = yes ; then
13122                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13123                 fi
13124
13125         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13126         if test "$cf_cv_shlib_version" = rel; then
13127                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13128         else
13129                 cf_cv_shared_soname='`basename $@`'
13130         fi
13131
13132                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13133                 ;;
13134         (mingw*msvc*)
13135                 cf_cv_shlib_version=msvcdll
13136                 cf_cv_shlib_version_infix=msvcdll
13137                 shlibdir=$bindir
13138                 MAKE_DLLS=
13139                 if test "$DFT_LWR_MODEL" = "shared" ; then
13140                         LOCAL_LDFLAGS="-link -dll"
13141                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13142                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
13143                 fi
13144                 CC_SHARED_OPTS=
13145                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
13146                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
13147                 cat >mk_shared_lib.sh <<-CF_EOF
13148                 #!$SHELL
13149                 SHARED_LIB=\$1
13150                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
13151                 shift
13152                 my_ld=\$1
13153                 shift
13154                 cat <<-EOF
13155                 Linking shared library
13156                 ** SHARED LIB \$SHARED_LIB
13157                 ** IMPORT_LIB \$IMPORT_LIB
13158 EOF
13159                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
13160                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
13161                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
13162 CF_EOF
13163                 chmod +x mk_shared_lib.sh
13164                 cat >mk_prog.sh <<-CF_EOF
13165                 #!$SHELL
13166                 shift
13167                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
13168                 LD="$LD"
13169                 clopts=()
13170                 ldopts=("/subsystem:console")
13171                 libs=()
13172                 isdll=0
13173                 while test \$# -gt 0; do
13174                         case "\$1" in
13175                                 -link)
13176                                         # ignore -link argument
13177                                         ;;
13178                                 -M[TD] | -M[TD]d)
13179                                         # ignore runtime-library option
13180                                         ;;
13181                                 -dll)
13182                                         isdll=1
13183                                         ;;
13184                                 -W* | -w*)
13185                                         # ignore warnings
13186                                         ;;
13187                                 -D*)
13188                                         clopts+=("\$1")
13189                                         ;;
13190                                 -I*)
13191                                         clopts+=("\$1")
13192                                         ;;
13193                                 -l*)
13194                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
13195                                         ;;
13196                                 -L*)
13197                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
13198                                         ;;
13199                                 *.obj | *.o)
13200                                         ldopts+=("\$1")
13201                                         ;;
13202                                 -Wl,*)
13203                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
13204                                                 ldopts+=("\${linkarg}")
13205                                         done
13206                                         ;;
13207                                 *.lib)
13208                                         ldopts+=("\$1")
13209                                         ;;
13210                                 -o)
13211                                         shift
13212                                         ldopts+=("-out:\$1")
13213                                         ;;
13214                                 *)
13215                                         clopts+=("\$1")
13216                                         ldopts+=("\$1")
13217                                         ;;
13218                         esac
13219                         shift
13220                 done
13221                 if [ "\$isdll" -ne 0 ]; then
13222                         for lib in \${libs[*]}; do
13223                                 ldopts+=("\$lib.dll.lib")
13224                         done
13225                 else
13226                         for lib in \${libs[*]}; do
13227                                 ldopts+=("\$lib.lib")
13228                         done
13229                 fi
13230                 cat <<-EOF
13231                 Creating program
13232                 ** ld options:   "\${ldopts[@]}"
13233 EOF
13234                 exec \$LD \${ldopts[@]}
13235 CF_EOF
13236                 chmod +x mk_prog.sh
13237                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
13238                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
13239                 ;;
13240         (mingw*)
13241                 cf_cv_shlib_version=mingw
13242                 cf_cv_shlib_version_infix=mingw
13243                 shlibdir=$bindir
13244                 MAKE_DLLS=
13245                 if test "$DFT_LWR_MODEL" = "shared" ; then
13246                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
13247                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13248                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
13249                 fi
13250                 CC_SHARED_OPTS=
13251                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13252                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13253                 cat >mk_shared_lib.sh <<-CF_EOF
13254                 #!$SHELL
13255                 SHARED_LIB=\$1
13256                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
13257                 shift
13258                 cat <<-EOF
13259                 Linking shared library
13260                 ** SHARED_LIB \$SHARED_LIB
13261                 ** IMPORT_LIB \$IMPORT_LIB
13262 EOF
13263                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13264 CF_EOF
13265                 chmod +x mk_shared_lib.sh
13266                 ;;
13267         (openbsd[2-9].*|mirbsd*)
13268                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13269                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13270                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13271                 fi
13272                 if test "$cf_cv_enable_rpath" = yes ; then
13273                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13274                 fi
13275                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13276
13277         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13278         if test "$cf_cv_shlib_version" = rel; then
13279                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13280         else
13281                 cf_cv_shared_soname='`basename $@`'
13282         fi
13283
13284                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13285                 ;;
13286         (nskJ*)
13287                 CC_SHARED_OPTS=
13288                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
13289                 ;;
13290         (nskL*)
13291                 CC_SHARED_OPTS=
13292                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
13293                 ;;
13294         (nto-qnx*|openbsd*|freebsd[12].*)
13295                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13296                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
13297                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13298                 ;;
13299         (dragonfly*|freebsd*)
13300                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13301                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13302                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13303                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
13304                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13305                 fi
13306
13307         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13308         if test "$cf_cv_shlib_version" = rel; then
13309                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13310         else
13311                 cf_cv_shared_soname='`basename $@`'
13312         fi
13313
13314                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13315                 ;;
13316         (netbsd*)
13317                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13318                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13319                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13320                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13321                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13322                         if test "$cf_cv_shlib_version" = auto; then
13323                         if test -f /usr/libexec/ld.elf_so; then
13324                                 cf_cv_shlib_version=abi
13325                         else
13326                                 cf_cv_shlib_version=rel
13327                         fi
13328                         fi
13329
13330         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13331         if test "$cf_cv_shlib_version" = rel; then
13332                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13333         else
13334                 cf_cv_shared_soname='`basename $@`'
13335         fi
13336
13337                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
13338                 else
13339                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
13340                 fi
13341                 ;;
13342         (osf*|mls+*)
13343                 # tested with OSF/1 V3.2 and 'cc'
13344                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
13345                 # link with shared libs).
13346                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
13347                 case "$host_os" in
13348                 (osf4*)
13349                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
13350                         ;;
13351                 esac
13352                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
13353                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13354                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13355                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13356                 fi
13357                 cf_cv_rm_so_locs=yes
13358                 ;;
13359         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
13360                 # tested with osr5.0.5
13361                 if test "$GCC" != yes; then
13362                         CC_SHARED_OPTS='-belf -KPIC'
13363                 fi
13364                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
13365                 if test "$cf_cv_enable_rpath" = yes ; then
13366                         # only way is to set LD_RUN_PATH but no switch for it
13367                         RUN_PATH=$libdir
13368                 fi
13369                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13370                 LINK_PROGS='LD_RUN_PATH=${libdir}'
13371                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
13372                 ;;
13373         (sunos4*)
13374                 # tested with SunOS 4.1.1 and gcc 2.7.0
13375                 if test "$GCC" != yes; then
13376                         CC_SHARED_OPTS='-KPIC'
13377                 fi
13378                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
13379                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13380                 ;;
13381         (solaris2*)
13382                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
13383                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
13384                 if test "$DFT_LWR_MODEL" = "shared" ; then
13385                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
13386                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13387                 fi
13388                 if test "$cf_cv_enable_rpath" = yes ; then
13389                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
13390                 fi
13391
13392         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13393         if test "$cf_cv_shlib_version" = rel; then
13394                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13395         else
13396                 cf_cv_shared_soname='`basename $@`'
13397         fi
13398
13399                 if test "$GCC" != yes; then
13400                         cf_save_CFLAGS="$CFLAGS"
13401                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
13402                         do
13403                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
13404                                 cat >"conftest.$ac_ext" <<_ACEOF
13405 #line 13405 "configure"
13406 #include "confdefs.h"
13407 #include <stdio.h>
13408 int
13409 main (void)
13410 {
13411 printf("Hello\\n");
13412   ;
13413   return 0;
13414 }
13415 _ACEOF
13416 rm -f "conftest.$ac_objext"
13417 if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5
13418   (eval $ac_compile) 2>&5
13419   ac_status=$?
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit "$ac_status"); } &&
13422          { ac_try='test -s "conftest.$ac_objext"'
13423   { (eval echo "$as_me:13423: \"$ac_try\"") >&5
13424   (eval $ac_try) 2>&5
13425   ac_status=$?
13426   echo "$as_me:13426: \$? = $ac_status" >&5
13427   (exit "$ac_status"); }; }; then
13428   break
13429 else
13430   echo "$as_me: failed program was:" >&5
13431 cat "conftest.$ac_ext" >&5
13432 fi
13433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13434                         done
13435                         CFLAGS="$cf_save_CFLAGS"
13436                         CC_SHARED_OPTS=$cf_shared_opts
13437                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
13438                 else
13439                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
13440                 fi
13441                 ;;
13442         (sysv5uw7*|unix_sv*)
13443                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
13444                 if test "$GCC" != yes; then
13445                         CC_SHARED_OPTS='-KPIC'
13446                 fi
13447                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
13448                 ;;
13449         (*)
13450                 CC_SHARED_OPTS='unknown'
13451                 MK_SHARED_LIB='echo unknown'
13452                 ;;
13453         esac
13454
13455         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
13456         case "$cf_cv_shlib_version" in
13457         (rel|abi)
13458                 case "$MK_SHARED_LIB" in
13459                 (*'-o $@')
13460                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
13461                         ;;
13462                 (*)
13463                         { echo "$as_me:13463: WARNING: ignored --with-shlib-version" >&5
13464 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
13465                         ;;
13466                 esac
13467                 ;;
13468         esac
13469
13470         if test -n "$cf_try_cflags"
13471         then
13472 cat > conftest.$ac_ext <<EOF
13473 #line 13473 "${as_me:-configure}"
13474 #include <stdio.h>
13475 int main(int argc, char *argv[])
13476 {
13477         printf("hello\\n");
13478         return (argv[argc-1] == 0) ;
13479 }
13480 EOF
13481                 cf_save_CFLAGS="$CFLAGS"
13482                 for cf_opt in $cf_try_cflags
13483                 do
13484                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
13485                         echo "$as_me:13485: checking if CFLAGS option -$cf_opt works" >&5
13486 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
13487                         if { (eval echo "$as_me:13487: \"$ac_compile\"") >&5
13488   (eval $ac_compile) 2>&5
13489   ac_status=$?
13490   echo "$as_me:13490: \$? = $ac_status" >&5
13491   (exit "$ac_status"); }; then
13492                                 echo "$as_me:13492: result: yes" >&5
13493 echo "${ECHO_T}yes" >&6
13494                                 cf_save_CFLAGS="$CFLAGS"
13495                         else
13496                                 echo "$as_me:13496: result: no" >&5
13497 echo "${ECHO_T}no" >&6
13498                         fi
13499                 done
13500                 CFLAGS="$cf_save_CFLAGS"
13501         fi
13502
13503         # RPATH_LIST is a colon-separated list of directories
13504         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
13505         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
13506
13507         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
13508
13509         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
13510
13511 echo "${as_me:-configure}:13511: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
13512
13513         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13514
13515 echo "${as_me:-configure}:13515: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13516
13517 echo "$as_me:13517: checking if versioned-symbols file should be used" >&5
13518 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
13519
13520 # Check whether --with-versioned-syms or --without-versioned-syms was given.
13521 if test "${with_versioned_syms+set}" = set; then
13522   withval="$with_versioned_syms"
13523   with_versioned_syms=$withval
13524 else
13525   with_versioned_syms=no
13526 fi;
13527 case "x$with_versioned_syms" in
13528 (xyes)
13529         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
13530
13531         ;;
13532 (xno)
13533         ;;
13534 (x/*)
13535         test -f "$with_versioned_syms" || { { echo "$as_me:13535: error: expected a filename: $with_versioned_syms" >&5
13536 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13537    { (exit 1); exit 1; }; }
13538         ;;
13539 (*)
13540         test -f "$with_versioned_syms" || { { echo "$as_me:13540: error: expected a filename: $with_versioned_syms" >&5
13541 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13542    { (exit 1); exit 1; }; }
13543         with_versioned_syms=`pwd`/"$with_versioned_syms"
13544         ;;
13545 esac
13546 echo "$as_me:13546: result: $with_versioned_syms" >&5
13547 echo "${ECHO_T}$with_versioned_syms" >&6
13548
13549 RESULTING_SYMS=
13550 VERSIONED_SYMS=
13551 WILDCARD_SYMS=
13552
13553 if test "x$with_versioned_syms" != xno
13554 then
13555         RESULTING_SYMS=$with_versioned_syms
13556         case "x$MK_SHARED_LIB" in
13557         (*-Wl,*)
13558                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
13559                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
13560                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13561
13562 echo "${as_me:-configure}:13562: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13563
13564                 ;;
13565         (*-dy\ *)
13566                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
13567                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
13568                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13569
13570 echo "${as_me:-configure}:13570: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13571
13572                 ;;
13573         (*)
13574                 { echo "$as_me:13574: WARNING: this system does not support versioned-symbols" >&5
13575 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
13576                 ;;
13577         esac
13578
13579         # Linux ld can selectively override scope, e.g., of symbols beginning with
13580         # "_" by first declaring some as global, and then using a wildcard to
13581         # declare the others as local.  Some other loaders cannot do this.  Check
13582         # by constructing a (very) simple shared library and inspecting its
13583         # symbols.
13584         if test "x$VERSIONED_SYMS" != "x"
13585         then
13586                 echo "$as_me:13586: checking if wildcards can be used to selectively omit symbols" >&5
13587 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
13588                 WILDCARD_SYMS=no
13589
13590                 # make sources
13591                 rm -f conftest.*
13592
13593                 cat >conftest.ver <<EOF
13594 module_1.0 {
13595 global:
13596         globalf1;
13597 local:
13598         localf1;
13599 };
13600 module_2.0 {
13601 global:
13602         globalf2;
13603 local:
13604         localf2;
13605         _*;
13606 } module_1.0;
13607 submodule_1.0 {
13608 global:
13609         subglobalf1;
13610         _ismissing;
13611 local:
13612         sublocalf1;
13613 };
13614 submodule_2.0 {
13615 global:
13616         subglobalf2;
13617 local:
13618         sublocalf2;
13619         _*;
13620 } submodule_1.0;
13621 EOF
13622                 cat >conftest.$ac_ext <<EOF
13623 #line 13623 "configure"
13624 int     _ismissing(void) { return 1; }
13625 int     _localf1(void) { return 1; }
13626 int     _localf2(void) { return 2; }
13627 int     globalf1(void) { return 1; }
13628 int     globalf2(void) { return 2; }
13629 int     _sublocalf1(void) { return 1; }
13630 int     _sublocalf2(void) { return 2; }
13631 int     subglobalf1(void) { return 1; }
13632 int     subglobalf2(void) { return 2; }
13633 EOF
13634                 cat >conftest.mk <<EOF
13635 CC=${CC}
13636 CFLAGS=${CFLAGS}
13637 CPPFLAGS=${CPPFLAGS}
13638 LDFLAGS=${LDFLAGS}
13639 LIBS=${LIBS}
13640 VERSIONED_SYMS=${VERSIONED_SYMS}
13641 RESULTING_SYMS=conftest.ver
13642 MK_SHARED_LIB=${MK_SHARED_LIB}
13643 conftest.so: conftest.$ac_cv_objext
13644                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
13645 EOF
13646
13647                 # compile source, make library
13648                 if make -f conftest.mk 2>&5 >/dev/null
13649                 then
13650                         # test for missing symbol in either Data or Text section
13651                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
13652                         test -n "$cf_missing" && WILDCARD_SYMS=yes
13653                 fi
13654                 echo "$as_me:13654: result: $WILDCARD_SYMS" >&5
13655 echo "${ECHO_T}$WILDCARD_SYMS" >&6
13656                 rm -f conftest.*
13657         fi
13658 fi
13659
13660                 LIB_PREP=:
13661                 LIB_CREATE="$MK_SHARED_LIB"
13662                 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
13663                 MAKE_NORMAL="#"
13664                 MAKE_STATIC="#"
13665                 MAKE_SHARED=
13666         fi
13667 fi
13668
13669 LIB_SUFFIX=
13670
13671         case X$LIB_MODEL in
13672         (Xlibtool)
13673                 DFT_LIB_SUFFIX='.la'
13674                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13675                 ;;
13676         (Xdebug)
13677                 case "$cf_cv_system_name" in
13678                 (*-msvc*)
13679                         DFT_LIB_SUFFIX='_g.lib'
13680                         ;;
13681                 (*)
13682                         DFT_LIB_SUFFIX='_g.a'
13683                         ;;
13684                 esac
13685                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13686                 ;;
13687         (Xprofile)
13688                 case "$cf_cv_system_name" in
13689                 (*-msvc*)
13690                         DFT_LIB_SUFFIX='_p.lib'
13691                         ;;
13692                 (*)
13693                         DFT_LIB_SUFFIX='_p.a'
13694                         ;;
13695                 esac
13696                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13697                 ;;
13698         (Xshared)
13699                 case "$cf_cv_system_name" in
13700                 (aix[5-7]*)
13701                         DFT_LIB_SUFFIX='.so'
13702                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13703                         ;;
13704                 (*-msvc*)
13705                         DFT_LIB_SUFFIX='.dll'
13706                         DFT_DEP_SUFFIX='.dll.lib'
13707                         ;;
13708                 (cygwin*|msys*|mingw*)
13709                         DFT_LIB_SUFFIX='.dll'
13710                         DFT_DEP_SUFFIX='.dll.a'
13711                         ;;
13712                 (darwin*)
13713                         DFT_LIB_SUFFIX='.dylib'
13714                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13715                         ;;
13716                 (hpux*)
13717                         case "$target" in
13718                         (ia64*)
13719                                 DFT_LIB_SUFFIX='.so'
13720                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13721                                 ;;
13722                         (*)
13723                                 DFT_LIB_SUFFIX='.sl'
13724                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13725                                 ;;
13726                         esac
13727                         ;;
13728                 (*)
13729                         DFT_LIB_SUFFIX='.so'
13730                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13731                         ;;
13732                 esac
13733                 ;;
13734         (*)
13735                 case "$target" in
13736                 (*-msvc*)
13737                         DFT_LIB_SUFFIX='.lib'
13738                         ;;
13739                 (*)
13740                         DFT_LIB_SUFFIX='.a'
13741                         ;;
13742                 esac
13743                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13744                 ;;
13745         esac
13746         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13747         then
13748                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13749                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13750         fi
13751
13752 LIB_SUFFIX=$DFT_LIB_SUFFIX
13753
13754 echo "$as_me:13754: checking for specific curses-directory" >&5
13755 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13756
13757 # Check whether --with-curses-dir or --without-curses-dir was given.
13758 if test "${with_curses_dir+set}" = set; then
13759   withval="$with_curses_dir"
13760   cf_cv_curses_dir=$withval
13761 else
13762   cf_cv_curses_dir=no
13763 fi;
13764 echo "$as_me:13764: result: $cf_cv_curses_dir" >&5
13765 echo "${ECHO_T}$cf_cv_curses_dir" >&6
13766
13767 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13768 then
13769
13770 if test "x$prefix" != xNONE; then
13771         cf_path_syntax="$prefix"
13772 else
13773         cf_path_syntax="$ac_default_prefix"
13774 fi
13775
13776 case ".$withval" in
13777 (.\$\(*\)*|.\'*\'*)
13778         ;;
13779 (..|./*|.\\*)
13780         ;;
13781 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13782         ;;
13783 (.\$\{*prefix\}*|.\$\{*dir\}*)
13784         eval withval="$withval"
13785         case ".$withval" in
13786         (.NONE/*)
13787                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13788                 ;;
13789         esac
13790         ;;
13791 (.no|.NONE/*)
13792         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13793         ;;
13794 (*)
13795         { { echo "$as_me:13795: error: expected a pathname, not \"$withval\"" >&5
13796 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13797    { (exit 1); exit 1; }; }
13798         ;;
13799 esac
13800
13801         if test -d "$cf_cv_curses_dir"
13802         then
13803
13804 if test -n "$cf_cv_curses_dir/include" ; then
13805   for cf_add_incdir in $cf_cv_curses_dir/include
13806   do
13807         while test "$cf_add_incdir" != /usr/include
13808         do
13809           if test -d "$cf_add_incdir"
13810           then
13811                 cf_have_incdir=no
13812                 if test -n "$CFLAGS$CPPFLAGS" ; then
13813                   # a loop is needed to ensure we can add subdirs of existing dirs
13814                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13815                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13816                           cf_have_incdir=yes; break
13817                         fi
13818                   done
13819                 fi
13820
13821                 if test "$cf_have_incdir" = no ; then
13822                   if test "$cf_add_incdir" = /usr/local/include ; then
13823                         if test "$GCC" = yes
13824                         then
13825                           cf_save_CPPFLAGS=$CPPFLAGS
13826
13827         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13828         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13829
13830                           cat >"conftest.$ac_ext" <<_ACEOF
13831 #line 13831 "configure"
13832 #include "confdefs.h"
13833 #include <stdio.h>
13834 int
13835 main (void)
13836 {
13837 printf("Hello")
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 rm -f "conftest.$ac_objext"
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844   (eval $ac_compile) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit "$ac_status"); } &&
13848          { ac_try='test -s "conftest.$ac_objext"'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit "$ac_status"); }; }; then
13854   :
13855 else
13856   echo "$as_me: failed program was:" >&5
13857 cat "conftest.$ac_ext" >&5
13858 cf_have_incdir=yes
13859 fi
13860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13861                           CPPFLAGS=$cf_save_CPPFLAGS
13862                         fi
13863                   fi
13864                 fi
13865
13866                 if test "$cf_have_incdir" = no ; then
13867                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13868
13869 echo "${as_me:-configure}:13869: testing adding $cf_add_incdir to include-path ..." 1>&5
13870
13871                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13872
13873                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13874                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13875                   cf_add_incdir="$cf_top_incdir"
13876                 else
13877                   break
13878                 fi
13879           else
13880                 break
13881           fi
13882         done
13883   done
13884 fi
13885
13886 if test -n "$cf_cv_curses_dir/lib" ; then
13887         for cf_add_libdir in $cf_cv_curses_dir/lib
13888         do
13889                 if test "$cf_add_libdir" = /usr/lib ; then
13890                         :
13891                 elif test -d "$cf_add_libdir"
13892                 then
13893                         cf_have_libdir=no
13894                         if test -n "$LDFLAGS$LIBS" ; then
13895                                 # a loop is needed to ensure we can add subdirs of existing dirs
13896                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13897                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13898                                                 cf_have_libdir=yes; break
13899                                         fi
13900                                 done
13901                         fi
13902                         if test "$cf_have_libdir" = no ; then
13903                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13904
13905 echo "${as_me:-configure}:13905: testing adding $cf_add_libdir to library-path ..." 1>&5
13906
13907                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13908                         fi
13909                 fi
13910         done
13911 fi
13912
13913         fi
13914 fi
13915
13916 echo "$as_me:13916: checking for specific curses-directory" >&5
13917 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13918
13919 # Check whether --with-curses-dir or --without-curses-dir was given.
13920 if test "${with_curses_dir+set}" = set; then
13921   withval="$with_curses_dir"
13922   cf_cv_curses_dir=$withval
13923 else
13924   cf_cv_curses_dir=no
13925 fi;
13926 echo "$as_me:13926: result: $cf_cv_curses_dir" >&5
13927 echo "${ECHO_T}$cf_cv_curses_dir" >&6
13928
13929 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13930 then
13931
13932 if test "x$prefix" != xNONE; then
13933         cf_path_syntax="$prefix"
13934 else
13935         cf_path_syntax="$ac_default_prefix"
13936 fi
13937
13938 case ".$withval" in
13939 (.\$\(*\)*|.\'*\'*)
13940         ;;
13941 (..|./*|.\\*)
13942         ;;
13943 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13944         ;;
13945 (.\$\{*prefix\}*|.\$\{*dir\}*)
13946         eval withval="$withval"
13947         case ".$withval" in
13948         (.NONE/*)
13949                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13950                 ;;
13951         esac
13952         ;;
13953 (.no|.NONE/*)
13954         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13955         ;;
13956 (*)
13957         { { echo "$as_me:13957: error: expected a pathname, not \"$withval\"" >&5
13958 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13959    { (exit 1); exit 1; }; }
13960         ;;
13961 esac
13962
13963         if test -d "$cf_cv_curses_dir"
13964         then
13965
13966 if test -n "$cf_cv_curses_dir/include" ; then
13967   for cf_add_incdir in $cf_cv_curses_dir/include
13968   do
13969         while test "$cf_add_incdir" != /usr/include
13970         do
13971           if test -d "$cf_add_incdir"
13972           then
13973                 cf_have_incdir=no
13974                 if test -n "$CFLAGS$CPPFLAGS" ; then
13975                   # a loop is needed to ensure we can add subdirs of existing dirs
13976                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13977                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13978                           cf_have_incdir=yes; break
13979                         fi
13980                   done
13981                 fi
13982
13983                 if test "$cf_have_incdir" = no ; then
13984                   if test "$cf_add_incdir" = /usr/local/include ; then
13985                         if test "$GCC" = yes
13986                         then
13987                           cf_save_CPPFLAGS=$CPPFLAGS
13988
13989         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13990         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13991
13992                           cat >"conftest.$ac_ext" <<_ACEOF
13993 #line 13993 "configure"
13994 #include "confdefs.h"
13995 #include <stdio.h>
13996 int
13997 main (void)
13998 {
13999 printf("Hello")
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f "conftest.$ac_objext"
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit "$ac_status"); } &&
14010          { ac_try='test -s "conftest.$ac_objext"'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit "$ac_status"); }; }; then
14016   :
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat "conftest.$ac_ext" >&5
14020 cf_have_incdir=yes
14021 fi
14022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14023                           CPPFLAGS=$cf_save_CPPFLAGS
14024                         fi
14025                   fi
14026                 fi
14027
14028                 if test "$cf_have_incdir" = no ; then
14029                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14030
14031 echo "${as_me:-configure}:14031: testing adding $cf_add_incdir to include-path ..." 1>&5
14032
14033                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14034
14035                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
14036                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14037                   cf_add_incdir="$cf_top_incdir"
14038                 else
14039                   break
14040                 fi
14041           else
14042                 break
14043           fi
14044         done
14045   done
14046 fi
14047
14048 if test -n "$cf_cv_curses_dir/lib" ; then
14049         for cf_add_libdir in $cf_cv_curses_dir/lib
14050         do
14051                 if test "$cf_add_libdir" = /usr/lib ; then
14052                         :
14053                 elif test -d "$cf_add_libdir"
14054                 then
14055                         cf_have_libdir=no
14056                         if test -n "$LDFLAGS$LIBS" ; then
14057                                 # a loop is needed to ensure we can add subdirs of existing dirs
14058                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
14059                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14060                                                 cf_have_libdir=yes; break
14061                                         fi
14062                                 done
14063                         fi
14064                         if test "$cf_have_libdir" = no ; then
14065                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14066
14067 echo "${as_me:-configure}:14067: testing adding $cf_add_libdir to library-path ..." 1>&5
14068
14069                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14070                         fi
14071                 fi
14072         done
14073 fi
14074
14075         fi
14076 fi
14077
14078 cf_cv_screen=curses
14079
14080 echo "$as_me:14080: checking for specified curses library type" >&5
14081 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
14082
14083 # Check whether --with-screen or --without-screen was given.
14084 if test "${with_screen+set}" = set; then
14085   withval="$with_screen"
14086   cf_cv_screen=$withval
14087 else
14088
14089 # Check whether --with-ncursesw or --without-ncursesw was given.
14090 if test "${with_ncursesw+set}" = set; then
14091   withval="$with_ncursesw"
14092   cf_cv_screen=ncursesw
14093 else
14094
14095 # Check whether --with-ncurses or --without-ncurses was given.
14096 if test "${with_ncurses+set}" = set; then
14097   withval="$with_ncurses"
14098   cf_cv_screen=ncurses
14099 else
14100
14101 # Check whether --with-pdcurses or --without-pdcurses was given.
14102 if test "${with_pdcurses+set}" = set; then
14103   withval="$with_pdcurses"
14104   cf_cv_screen=pdcurses
14105 else
14106
14107 # Check whether --with-curses-colr or --without-curses-colr was given.
14108 if test "${with_curses_colr+set}" = set; then
14109   withval="$with_curses_colr"
14110   cf_cv_screen=curses_colr
14111 else
14112
14113 # Check whether --with-curses-5lib or --without-curses-5lib was given.
14114 if test "${with_curses_5lib+set}" = set; then
14115   withval="$with_curses_5lib"
14116   cf_cv_screen=curses_5lib
14117 fi;
14118 fi;
14119 fi;
14120 fi;
14121 fi;
14122 fi;
14123
14124 echo "$as_me:14124: result: $cf_cv_screen" >&5
14125 echo "${ECHO_T}$cf_cv_screen" >&6
14126
14127 case $cf_cv_screen in
14128 (curses|curses_*)
14129
14130 echo "$as_me:14130: checking for extra include directories" >&5
14131 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
14132 if test "${cf_cv_curses_incdir+set}" = set; then
14133   echo $ECHO_N "(cached) $ECHO_C" >&6
14134 else
14135
14136 cf_cv_curses_incdir=no
14137 case "$host_os" in
14138 (hpux10.*)
14139         if test "x$cf_cv_screen" = "xcurses_colr"
14140         then
14141                 test -d /usr/include/curses_colr && \
14142                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
14143         fi
14144         ;;
14145 (sunos3*|sunos4*)
14146         if test "x$cf_cv_screen" = "xcurses_5lib"
14147         then
14148                 test -d /usr/5lib && \
14149                 test -d /usr/5include && \
14150                 cf_cv_curses_incdir="-I/usr/5include"
14151         fi
14152         ;;
14153 esac
14154
14155 fi
14156 echo "$as_me:14156: result: $cf_cv_curses_incdir" >&5
14157 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
14158 if test "$cf_cv_curses_incdir" != no
14159 then
14160
14161         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14162         CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
14163
14164 fi
14165
14166 echo "$as_me:14166: checking if we have identified curses headers" >&5
14167 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14168 if test "${cf_cv_ncurses_header+set}" = set; then
14169   echo $ECHO_N "(cached) $ECHO_C" >&6
14170 else
14171
14172 cf_cv_ncurses_header=none
14173 for cf_header in \
14174         ncurses.h  \
14175         curses.h  ncurses/ncurses.h ncurses/curses.h
14176 do
14177 cat >"conftest.$ac_ext" <<_ACEOF
14178 #line 14178 "configure"
14179 #include "confdefs.h"
14180 #include <${cf_header}>
14181 int
14182 main (void)
14183 {
14184 initscr(); tgoto("?", 0,0)
14185   ;
14186   return 0;
14187 }
14188 _ACEOF
14189 rm -f "conftest.$ac_objext"
14190 if { (eval echo "$as_me:14190: \"$ac_compile\"") >&5
14191   (eval $ac_compile) 2>&5
14192   ac_status=$?
14193   echo "$as_me:14193: \$? = $ac_status" >&5
14194   (exit "$ac_status"); } &&
14195          { ac_try='test -s "conftest.$ac_objext"'
14196   { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit "$ac_status"); }; }; then
14201   cf_cv_ncurses_header=$cf_header; break
14202 else
14203   echo "$as_me: failed program was:" >&5
14204 cat "conftest.$ac_ext" >&5
14205 fi
14206 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14207 done
14208
14209 fi
14210 echo "$as_me:14210: result: $cf_cv_ncurses_header" >&5
14211 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14212
14213 if test "$cf_cv_ncurses_header" = none ; then
14214         { { echo "$as_me:14214: error: No curses header-files found" >&5
14215 echo "$as_me: error: No curses header-files found" >&2;}
14216    { (exit 1); exit 1; }; }
14217 fi
14218
14219 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14220
14221 for ac_header in $cf_cv_ncurses_header
14222 do
14223 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14224 echo "$as_me:14224: checking for $ac_header" >&5
14225 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14226 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14227   echo $ECHO_N "(cached) $ECHO_C" >&6
14228 else
14229   cat >"conftest.$ac_ext" <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14232 #include <$ac_header>
14233 _ACEOF
14234 if { (eval echo "$as_me:14234: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14235   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14236   ac_status=$?
14237   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14238   rm -f conftest.er1
14239   cat conftest.err >&5
14240   echo "$as_me:14240: \$? = $ac_status" >&5
14241   (exit "$ac_status"); } >/dev/null; then
14242   if test -s conftest.err; then
14243     ac_cpp_err=$ac_c_preproc_warn_flag
14244   else
14245     ac_cpp_err=
14246   fi
14247 else
14248   ac_cpp_err=yes
14249 fi
14250 if test -z "$ac_cpp_err"; then
14251   eval "$as_ac_Header=yes"
14252 else
14253   echo "$as_me: failed program was:" >&5
14254   cat "conftest.$ac_ext" >&5
14255   eval "$as_ac_Header=no"
14256 fi
14257 rm -f conftest.err "conftest.$ac_ext"
14258 fi
14259 echo "$as_me:14259: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14260 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14261 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14262   cat >>confdefs.h <<EOF
14263 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14264 EOF
14265
14266 fi
14267 done
14268
14269 echo "$as_me:14269: checking for terminfo header" >&5
14270 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14271 if test "${cf_cv_term_header+set}" = set; then
14272   echo $ECHO_N "(cached) $ECHO_C" >&6
14273 else
14274
14275 case "${cf_cv_ncurses_header}" in
14276 (*/ncurses.h|*/ncursesw.h)
14277         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14278         ;;
14279 (*)
14280         cf_term_header=term.h
14281         ;;
14282 esac
14283
14284 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14285 do
14286 cat >"conftest.$ac_ext" <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289 #include <stdio.h>
14290 #include <${cf_cv_ncurses_header:-curses.h}>
14291 #include <$cf_test>
14292
14293 int
14294 main (void)
14295 {
14296 int x = auto_left_margin; (void)x
14297   ;
14298   return 0;
14299 }
14300 _ACEOF
14301 rm -f "conftest.$ac_objext"
14302 if { (eval echo "$as_me:14302: \"$ac_compile\"") >&5
14303   (eval $ac_compile) 2>&5
14304   ac_status=$?
14305   echo "$as_me:14305: \$? = $ac_status" >&5
14306   (exit "$ac_status"); } &&
14307          { ac_try='test -s "conftest.$ac_objext"'
14308   { (eval echo "$as_me:14308: \"$ac_try\"") >&5
14309   (eval $ac_try) 2>&5
14310   ac_status=$?
14311   echo "$as_me:14311: \$? = $ac_status" >&5
14312   (exit "$ac_status"); }; }; then
14313
14314         cf_cv_term_header="$cf_test"
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat "conftest.$ac_ext" >&5
14318
14319         cf_cv_term_header=unknown
14320
14321 fi
14322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14323         test "$cf_cv_term_header" != unknown && break
14324 done
14325
14326 fi
14327 echo "$as_me:14327: result: $cf_cv_term_header" >&5
14328 echo "${ECHO_T}$cf_cv_term_header" >&6
14329
14330 # Set definitions to allow ifdef'ing to accommodate subdirectories
14331
14332 case "$cf_cv_term_header" in
14333 (*term.h)
14334
14335 cat >>confdefs.h <<\EOF
14336 #define HAVE_TERM_H 1
14337 EOF
14338
14339         ;;
14340 esac
14341
14342 case "$cf_cv_term_header" in
14343 (ncurses/term.h)
14344
14345 cat >>confdefs.h <<\EOF
14346 #define HAVE_NCURSES_TERM_H 1
14347 EOF
14348
14349         ;;
14350 (ncursesw/term.h)
14351
14352 cat >>confdefs.h <<\EOF
14353 #define HAVE_NCURSESW_TERM_H 1
14354 EOF
14355
14356         ;;
14357 esac
14358
14359 echo "$as_me:14359: checking for ncurses version" >&5
14360 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
14361 if test "${cf_cv_ncurses_version+set}" = set; then
14362   echo $ECHO_N "(cached) $ECHO_C" >&6
14363 else
14364
14365         cf_cv_ncurses_version=no
14366         cf_tempfile=out$$
14367         rm -f "$cf_tempfile"
14368         if test "$cross_compiling" = yes; then
14369
14370         # This will not work if the preprocessor splits the line after the
14371         # Autoconf token.  The 'unproto' program does that.
14372         cat > "conftest.$ac_ext" <<EOF
14373 #include <${cf_cv_ncurses_header:-curses.h}>
14374 #undef Autoconf
14375 #ifdef NCURSES_VERSION
14376 Autoconf NCURSES_VERSION
14377 #else
14378 #ifdef __NCURSES_H
14379 Autoconf "old"
14380 #endif
14381 ;
14382 #endif
14383 EOF
14384         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
14385         { (eval echo "$as_me:14385: \"$cf_try\"") >&5
14386   (eval $cf_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit "$ac_status"); }
14390         if test -f conftest.out ; then
14391                 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
14392                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
14393                 rm -f conftest.out
14394         fi
14395
14396 else
14397   cat >"conftest.$ac_ext" <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 #include <${cf_cv_ncurses_header:-curses.h}>
14402 #include <stdio.h>
14403 int main(void)
14404 {
14405         FILE *fp = fopen("$cf_tempfile", "w");
14406 #ifdef NCURSES_VERSION
14407 # ifdef NCURSES_VERSION_PATCH
14408         fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
14409 # else
14410         fprintf(fp, "%s\\n", NCURSES_VERSION);
14411 # endif
14412 #else
14413 # ifdef __NCURSES_H
14414         fprintf(fp, "old\\n");
14415 # else
14416         make an error
14417 # endif
14418 #endif
14419         ${cf_cv_main_return:-return}(0);
14420 }
14421 _ACEOF
14422 rm -f "conftest$ac_exeext"
14423 if { (eval echo "$as_me:14423: \"$ac_link\"") >&5
14424   (eval $ac_link) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14428   { (eval echo "$as_me:14428: \"$ac_try\"") >&5
14429   (eval $ac_try) 2>&5
14430   ac_status=$?
14431   echo "$as_me:14431: \$? = $ac_status" >&5
14432   (exit "$ac_status"); }; }; then
14433
14434         cf_cv_ncurses_version=`cat $cf_tempfile`
14435 else
14436   echo "$as_me: program exited with status $ac_status" >&5
14437 echo "$as_me: failed program was:" >&5
14438 cat "conftest.$ac_ext" >&5
14439 fi
14440 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14441 fi
14442         rm -f "$cf_tempfile"
14443
14444 fi
14445 echo "$as_me:14445: result: $cf_cv_ncurses_version" >&5
14446 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
14447 test "$cf_cv_ncurses_version" = no ||
14448 cat >>confdefs.h <<\EOF
14449 #define NCURSES 1
14450 EOF
14451
14452 echo "$as_me:14452: checking if we have identified curses libraries" >&5
14453 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
14454 cat >"conftest.$ac_ext" <<_ACEOF
14455 #line 14455 "configure"
14456 #include "confdefs.h"
14457 #include <${cf_cv_ncurses_header:-curses.h}>
14458 int
14459 main (void)
14460 {
14461 initscr(); tgoto("?", 0,0)
14462   ;
14463   return 0;
14464 }
14465 _ACEOF
14466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14467 if { (eval echo "$as_me:14467: \"$ac_link\"") >&5
14468   (eval $ac_link) 2>&5
14469   ac_status=$?
14470   echo "$as_me:14470: \$? = $ac_status" >&5
14471   (exit "$ac_status"); } &&
14472          { ac_try='test -s "conftest$ac_exeext"'
14473   { (eval echo "$as_me:14473: \"$ac_try\"") >&5
14474   (eval $ac_try) 2>&5
14475   ac_status=$?
14476   echo "$as_me:14476: \$? = $ac_status" >&5
14477   (exit "$ac_status"); }; }; then
14478   cf_result=yes
14479 else
14480   echo "$as_me: failed program was:" >&5
14481 cat "conftest.$ac_ext" >&5
14482 cf_result=no
14483 fi
14484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14485 echo "$as_me:14485: result: $cf_result" >&5
14486 echo "${ECHO_T}$cf_result" >&6
14487
14488 if test "$cf_result" = no ; then
14489 case "$host_os" in
14490 (freebsd*)
14491         echo "$as_me:14491: checking for tgoto in -lmytinfo" >&5
14492 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
14493 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
14494   echo $ECHO_N "(cached) $ECHO_C" >&6
14495 else
14496   ac_check_lib_save_LIBS=$LIBS
14497 LIBS="-lmytinfo  $LIBS"
14498 cat >"conftest.$ac_ext" <<_ACEOF
14499 #line 14499 "configure"
14500 #include "confdefs.h"
14501
14502 /* Override any gcc2 internal prototype to avoid an error.  */
14503 #ifdef __cplusplus
14504 extern "C"
14505 #endif
14506 /* We use char because int might match the return type of a gcc2
14507    builtin and then its argument prototype would still apply.  */
14508 char tgoto ();
14509 int
14510 main (void)
14511 {
14512 tgoto ();
14513   ;
14514   return 0;
14515 }
14516 _ACEOF
14517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14518 if { (eval echo "$as_me:14518: \"$ac_link\"") >&5
14519   (eval $ac_link) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit "$ac_status"); } &&
14523          { ac_try='test -s "conftest$ac_exeext"'
14524   { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525   (eval $ac_try) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit "$ac_status"); }; }; then
14529   ac_cv_lib_mytinfo_tgoto=yes
14530 else
14531   echo "$as_me: failed program was:" >&5
14532 cat "conftest.$ac_ext" >&5
14533 ac_cv_lib_mytinfo_tgoto=no
14534 fi
14535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14536 LIBS=$ac_check_lib_save_LIBS
14537 fi
14538 echo "$as_me:14538: result: $ac_cv_lib_mytinfo_tgoto" >&5
14539 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
14540 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
14541
14542 cf_add_libs="$LIBS"
14543 # reverse order
14544 cf_add_0lib=
14545 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14546 # filter duplicates
14547 for cf_add_1lib in $cf_add_0lib; do
14548         for cf_add_2lib in $cf_add_libs; do
14549                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14550                         cf_add_1lib=
14551                         break
14552                 fi
14553         done
14554         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14555 done
14556 LIBS="$cf_add_libs"
14557
14558 fi
14559
14560         ;;
14561 (hpux10.*)
14562         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
14563         # next (1998), and xcurses "newer" (2000).  There is no header file for
14564         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
14565         # term.h) for cur_colr
14566         if test "x$cf_cv_screen" = "xcurses_colr"
14567         then
14568                 echo "$as_me:14568: checking for initscr in -lcur_colr" >&5
14569 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
14570 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
14571   echo $ECHO_N "(cached) $ECHO_C" >&6
14572 else
14573   ac_check_lib_save_LIBS=$LIBS
14574 LIBS="-lcur_colr  $LIBS"
14575 cat >"conftest.$ac_ext" <<_ACEOF
14576 #line 14576 "configure"
14577 #include "confdefs.h"
14578
14579 /* Override any gcc2 internal prototype to avoid an error.  */
14580 #ifdef __cplusplus
14581 extern "C"
14582 #endif
14583 /* We use char because int might match the return type of a gcc2
14584    builtin and then its argument prototype would still apply.  */
14585 char initscr ();
14586 int
14587 main (void)
14588 {
14589 initscr ();
14590   ;
14591   return 0;
14592 }
14593 _ACEOF
14594 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14595 if { (eval echo "$as_me:14595: \"$ac_link\"") >&5
14596   (eval $ac_link) 2>&5
14597   ac_status=$?
14598   echo "$as_me:14598: \$? = $ac_status" >&5
14599   (exit "$ac_status"); } &&
14600          { ac_try='test -s "conftest$ac_exeext"'
14601   { (eval echo "$as_me:14601: \"$ac_try\"") >&5
14602   (eval $ac_try) 2>&5
14603   ac_status=$?
14604   echo "$as_me:14604: \$? = $ac_status" >&5
14605   (exit "$ac_status"); }; }; then
14606   ac_cv_lib_cur_colr_initscr=yes
14607 else
14608   echo "$as_me: failed program was:" >&5
14609 cat "conftest.$ac_ext" >&5
14610 ac_cv_lib_cur_colr_initscr=no
14611 fi
14612 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14613 LIBS=$ac_check_lib_save_LIBS
14614 fi
14615 echo "$as_me:14615: result: $ac_cv_lib_cur_colr_initscr" >&5
14616 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
14617 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
14618
14619 cf_add_libs="$LIBS"
14620 # reverse order
14621 cf_add_0lib=
14622 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14623 # filter duplicates
14624 for cf_add_1lib in $cf_add_0lib; do
14625         for cf_add_2lib in $cf_add_libs; do
14626                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14627                         cf_add_1lib=
14628                         break
14629                 fi
14630         done
14631         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14632 done
14633 LIBS="$cf_add_libs"
14634
14635                         ac_cv_func_initscr=yes
14636
14637 else
14638
14639                 echo "$as_me:14639: checking for initscr in -lHcurses" >&5
14640 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
14641 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
14642   echo $ECHO_N "(cached) $ECHO_C" >&6
14643 else
14644   ac_check_lib_save_LIBS=$LIBS
14645 LIBS="-lHcurses  $LIBS"
14646 cat >"conftest.$ac_ext" <<_ACEOF
14647 #line 14647 "configure"
14648 #include "confdefs.h"
14649
14650 /* Override any gcc2 internal prototype to avoid an error.  */
14651 #ifdef __cplusplus
14652 extern "C"
14653 #endif
14654 /* We use char because int might match the return type of a gcc2
14655    builtin and then its argument prototype would still apply.  */
14656 char initscr ();
14657 int
14658 main (void)
14659 {
14660 initscr ();
14661   ;
14662   return 0;
14663 }
14664 _ACEOF
14665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14666 if { (eval echo "$as_me:14666: \"$ac_link\"") >&5
14667   (eval $ac_link) 2>&5
14668   ac_status=$?
14669   echo "$as_me:14669: \$? = $ac_status" >&5
14670   (exit "$ac_status"); } &&
14671          { ac_try='test -s "conftest$ac_exeext"'
14672   { (eval echo "$as_me:14672: \"$ac_try\"") >&5
14673   (eval $ac_try) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit "$ac_status"); }; }; then
14677   ac_cv_lib_Hcurses_initscr=yes
14678 else
14679   echo "$as_me: failed program was:" >&5
14680 cat "conftest.$ac_ext" >&5
14681 ac_cv_lib_Hcurses_initscr=no
14682 fi
14683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14684 LIBS=$ac_check_lib_save_LIBS
14685 fi
14686 echo "$as_me:14686: result: $ac_cv_lib_Hcurses_initscr" >&5
14687 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
14688 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
14689
14690                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
14691
14692 cf_add_libs="$LIBS"
14693 # reverse order
14694 cf_add_0lib=
14695 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14696 # filter duplicates
14697 for cf_add_1lib in $cf_add_0lib; do
14698         for cf_add_2lib in $cf_add_libs; do
14699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14700                         cf_add_1lib=
14701                         break
14702                 fi
14703         done
14704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14705 done
14706 LIBS="$cf_add_libs"
14707
14708         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14709         CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
14710
14711                         ac_cv_func_initscr=yes
14712
14713 fi
14714
14715 fi
14716
14717         fi
14718         ;;
14719 (linux*)
14720         case `arch 2>/dev/null` in
14721         (x86_64)
14722                 if test -d /lib64
14723                 then
14724
14725 if test -n "/lib64" ; then
14726         for cf_add_libdir in /lib64
14727         do
14728                 if test "$cf_add_libdir" = /usr/lib ; then
14729                         :
14730                 elif test -d "$cf_add_libdir"
14731                 then
14732                         cf_have_libdir=no
14733                         if test -n "$LDFLAGS$LIBS" ; then
14734                                 # a loop is needed to ensure we can add subdirs of existing dirs
14735                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
14736                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14737                                                 cf_have_libdir=yes; break
14738                                         fi
14739                                 done
14740                         fi
14741                         if test "$cf_have_libdir" = no ; then
14742                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14743
14744 echo "${as_me:-configure}:14744: testing adding $cf_add_libdir to library-path ..." 1>&5
14745
14746                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14747                         fi
14748                 fi
14749         done
14750 fi
14751
14752                 else
14753
14754 if test -n "/lib" ; then
14755         for cf_add_libdir in /lib
14756         do
14757                 if test "$cf_add_libdir" = /usr/lib ; then
14758                         :
14759                 elif test -d "$cf_add_libdir"
14760                 then
14761                         cf_have_libdir=no
14762                         if test -n "$LDFLAGS$LIBS" ; then
14763                                 # a loop is needed to ensure we can add subdirs of existing dirs
14764                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
14765                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14766                                                 cf_have_libdir=yes; break
14767                                         fi
14768                                 done
14769                         fi
14770                         if test "$cf_have_libdir" = no ; then
14771                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14772
14773 echo "${as_me:-configure}:14773: testing adding $cf_add_libdir to library-path ..." 1>&5
14774
14775                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14776                         fi
14777                 fi
14778         done
14779 fi
14780
14781                 fi
14782                 ;;
14783         (*)
14784
14785 if test -n "/lib" ; then
14786         for cf_add_libdir in /lib
14787         do
14788                 if test "$cf_add_libdir" = /usr/lib ; then
14789                         :
14790                 elif test -d "$cf_add_libdir"
14791                 then
14792                         cf_have_libdir=no
14793                         if test -n "$LDFLAGS$LIBS" ; then
14794                                 # a loop is needed to ensure we can add subdirs of existing dirs
14795                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
14796                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14797                                                 cf_have_libdir=yes; break
14798                                         fi
14799                                 done
14800                         fi
14801                         if test "$cf_have_libdir" = no ; then
14802                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14803
14804 echo "${as_me:-configure}:14804: testing adding $cf_add_libdir to library-path ..." 1>&5
14805
14806                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14807                         fi
14808                 fi
14809         done
14810 fi
14811
14812                 ;;
14813         esac
14814         ;;
14815 (sunos3*|sunos4*)
14816         if test "x$cf_cv_screen" = "xcurses_5lib"
14817         then
14818                 if test -d /usr/5lib ; then
14819
14820 if test -n "/usr/5lib" ; then
14821         for cf_add_libdir in /usr/5lib
14822         do
14823                 if test "$cf_add_libdir" = /usr/lib ; then
14824                         :
14825                 elif test -d "$cf_add_libdir"
14826                 then
14827                         cf_have_libdir=no
14828                         if test -n "$LDFLAGS$LIBS" ; then
14829                                 # a loop is needed to ensure we can add subdirs of existing dirs
14830                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
14831                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14832                                                 cf_have_libdir=yes; break
14833                                         fi
14834                                 done
14835                         fi
14836                         if test "$cf_have_libdir" = no ; then
14837                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14838
14839 echo "${as_me:-configure}:14839: testing adding $cf_add_libdir to library-path ..." 1>&5
14840
14841                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14842                         fi
14843                 fi
14844         done
14845 fi
14846
14847 cf_add_libs="$LIBS"
14848 # reverse order
14849 cf_add_0lib=
14850 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14851 # filter duplicates
14852 for cf_add_1lib in $cf_add_0lib; do
14853         for cf_add_2lib in $cf_add_libs; do
14854                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14855                         cf_add_1lib=
14856                         break
14857                 fi
14858         done
14859         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14860 done
14861 LIBS="$cf_add_libs"
14862
14863                 fi
14864         fi
14865         ac_cv_func_initscr=yes
14866         ;;
14867 esac
14868
14869 if test ".$ac_cv_func_initscr" != .yes ; then
14870         cf_save_LIBS="$LIBS"
14871
14872         if test ".${cf_cv_ncurses_version:-no}" != .no
14873         then
14874                 cf_check_list="ncurses curses cursesX"
14875         else
14876                 cf_check_list="cursesX curses ncurses"
14877         fi
14878
14879         # Check for library containing tgoto.  Do this before curses library
14880         # because it may be needed to link the test-case for initscr.
14881         if test "x$cf_term_lib" = x
14882         then
14883                 echo "$as_me:14883: checking for tgoto" >&5
14884 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
14885 if test "${ac_cv_func_tgoto+set}" = set; then
14886   echo $ECHO_N "(cached) $ECHO_C" >&6
14887 else
14888   cat >"conftest.$ac_ext" <<_ACEOF
14889 #line 14889 "configure"
14890 #include "confdefs.h"
14891 #define tgoto autoconf_temporary
14892 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14893 #undef tgoto
14894
14895 #ifdef __cplusplus
14896 extern "C"
14897 #endif
14898
14899 /* We use char because int might match the return type of a gcc2
14900    builtin and then its argument prototype would still apply.  */
14901 char tgoto (void);
14902
14903 int
14904 main (void)
14905 {
14906
14907 /* The GNU C library defines stubs for functions which it implements
14908     to always fail with ENOSYS.  Some functions are actually named
14909     something starting with __ and the normal name is an alias.  */
14910 #if defined (__stub_tgoto) || defined (__stub___tgoto)
14911 #error found stub for tgoto
14912 #endif
14913
14914         return tgoto ();
14915   ;
14916   return 0;
14917 }
14918 _ACEOF
14919 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14920 if { (eval echo "$as_me:14920: \"$ac_link\"") >&5
14921   (eval $ac_link) 2>&5
14922   ac_status=$?
14923   echo "$as_me:14923: \$? = $ac_status" >&5
14924   (exit "$ac_status"); } &&
14925          { ac_try='test -s "conftest$ac_exeext"'
14926   { (eval echo "$as_me:14926: \"$ac_try\"") >&5
14927   (eval $ac_try) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit "$ac_status"); }; }; then
14931   ac_cv_func_tgoto=yes
14932 else
14933   echo "$as_me: failed program was:" >&5
14934 cat "conftest.$ac_ext" >&5
14935 ac_cv_func_tgoto=no
14936 fi
14937 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14938 fi
14939 echo "$as_me:14939: result: $ac_cv_func_tgoto" >&5
14940 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
14941 if test "$ac_cv_func_tgoto" = yes; then
14942   cf_term_lib=predefined
14943 else
14944
14945                         for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
14946                         do
14947                                 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
14948 echo "$as_me:14948: checking for tgoto in -l$cf_term_lib" >&5
14949 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
14950 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14951   echo $ECHO_N "(cached) $ECHO_C" >&6
14952 else
14953   ac_check_lib_save_LIBS=$LIBS
14954 LIBS="-l$cf_term_lib  $LIBS"
14955 cat >"conftest.$ac_ext" <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 /* Override any gcc2 internal prototype to avoid an error.  */
14960 #ifdef __cplusplus
14961 extern "C"
14962 #endif
14963 /* We use char because int might match the return type of a gcc2
14964    builtin and then its argument prototype would still apply.  */
14965 char tgoto ();
14966 int
14967 main (void)
14968 {
14969 tgoto ();
14970   ;
14971   return 0;
14972 }
14973 _ACEOF
14974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14975 if { (eval echo "$as_me:14975: \"$ac_link\"") >&5
14976   (eval $ac_link) 2>&5
14977   ac_status=$?
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit "$ac_status"); } &&
14980          { ac_try='test -s "conftest$ac_exeext"'
14981   { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982   (eval $ac_try) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit "$ac_status"); }; }; then
14986   eval "$as_ac_Lib=yes"
14987 else
14988   echo "$as_me: failed program was:" >&5
14989 cat "conftest.$ac_ext" >&5
14990 eval "$as_ac_Lib=no"
14991 fi
14992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14993 LIBS=$ac_check_lib_save_LIBS
14994 fi
14995 echo "$as_me:14995: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
14996 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
14997 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
14998
14999                                         : "${cf_nculib_root:=$cf_term_lib}"
15000                                         break
15001
15002 fi
15003
15004                         done
15005
15006 fi
15007
15008         fi
15009
15010         # Check for library containing initscr
15011         test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
15012         if test "x$cf_curs_lib" = x
15013         then
15014                 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
15015                 do
15016                         LIBS="-l$cf_curs_lib $cf_save_LIBS"
15017                         if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
15018                                 echo "$as_me:15018: checking if we can link with $cf_curs_lib library" >&5
15019 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
15020                                 cat >"conftest.$ac_ext" <<_ACEOF
15021 #line 15021 "configure"
15022 #include "confdefs.h"
15023 #include <${cf_cv_ncurses_header:-curses.h}>
15024 int
15025 main (void)
15026 {
15027 initscr()
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15033 if { (eval echo "$as_me:15033: \"$ac_link\"") >&5
15034   (eval $ac_link) 2>&5
15035   ac_status=$?
15036   echo "$as_me:15036: \$? = $ac_status" >&5
15037   (exit "$ac_status"); } &&
15038          { ac_try='test -s "conftest$ac_exeext"'
15039   { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040   (eval $ac_try) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit "$ac_status"); }; }; then
15044   cf_result=yes
15045 else
15046   echo "$as_me: failed program was:" >&5
15047 cat "conftest.$ac_ext" >&5
15048 cf_result=no
15049 fi
15050 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15051                                 echo "$as_me:15051: result: $cf_result" >&5
15052 echo "${ECHO_T}$cf_result" >&6
15053                                 test "$cf_result" = yes && break
15054                         elif test "$cf_curs_lib" = "$cf_term_lib" ; then
15055                                 cf_result=no
15056                         elif test "$cf_term_lib" != predefined ; then
15057                                 echo "$as_me:15057: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
15058 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
15059                                 cat >"conftest.$ac_ext" <<_ACEOF
15060 #line 15060 "configure"
15061 #include "confdefs.h"
15062 #include <${cf_cv_ncurses_header:-curses.h}>
15063 int
15064 main (void)
15065 {
15066 initscr(); tgoto((char *)0, 0, 0);
15067   ;
15068   return 0;
15069 }
15070 _ACEOF
15071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15072 if { (eval echo "$as_me:15072: \"$ac_link\"") >&5
15073   (eval $ac_link) 2>&5
15074   ac_status=$?
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit "$ac_status"); } &&
15077          { ac_try='test -s "conftest$ac_exeext"'
15078   { (eval echo "$as_me:15078: \"$ac_try\"") >&5
15079   (eval $ac_try) 2>&5
15080   ac_status=$?
15081   echo "$as_me:15081: \$? = $ac_status" >&5
15082   (exit "$ac_status"); }; }; then
15083   cf_result=no
15084 else
15085   echo "$as_me: failed program was:" >&5
15086 cat "conftest.$ac_ext" >&5
15087
15088                                         LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
15089                                         cat >"conftest.$ac_ext" <<_ACEOF
15090 #line 15090 "configure"
15091 #include "confdefs.h"
15092 #include <${cf_cv_ncurses_header:-curses.h}>
15093 int
15094 main (void)
15095 {
15096 initscr()
15097   ;
15098   return 0;
15099 }
15100 _ACEOF
15101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15102 if { (eval echo "$as_me:15102: \"$ac_link\"") >&5
15103   (eval $ac_link) 2>&5
15104   ac_status=$?
15105   echo "$as_me:15105: \$? = $ac_status" >&5
15106   (exit "$ac_status"); } &&
15107          { ac_try='test -s "conftest$ac_exeext"'
15108   { (eval echo "$as_me:15108: \"$ac_try\"") >&5
15109   (eval $ac_try) 2>&5
15110   ac_status=$?
15111   echo "$as_me:15111: \$? = $ac_status" >&5
15112   (exit "$ac_status"); }; }; then
15113   cf_result=yes
15114 else
15115   echo "$as_me: failed program was:" >&5
15116 cat "conftest.$ac_ext" >&5
15117 cf_result=error
15118 fi
15119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15120
15121 fi
15122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15123                                 echo "$as_me:15123: result: $cf_result" >&5
15124 echo "${ECHO_T}$cf_result" >&6
15125                                 test "$cf_result" != error && break
15126                         fi
15127                 done
15128         fi
15129         test "$cf_curs_lib" = unknown && { { echo "$as_me:15129: error: no curses library found" >&5
15130 echo "$as_me: error: no curses library found" >&2;}
15131    { (exit 1); exit 1; }; }
15132 fi
15133 fi
15134
15135         ;;
15136 (ncursesw*)
15137
15138 echo "$as_me:15138: checking for multibyte character support" >&5
15139 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
15140 if test "${cf_cv_utf8_lib+set}" = set; then
15141   echo $ECHO_N "(cached) $ECHO_C" >&6
15142 else
15143
15144         cf_save_LIBS="$LIBS"
15145         cat >"conftest.$ac_ext" <<_ACEOF
15146 #line 15146 "configure"
15147 #include "confdefs.h"
15148
15149 #include <stdlib.h>
15150 int
15151 main (void)
15152 {
15153 putwc(0,0);
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15159 if { (eval echo "$as_me:15159: \"$ac_link\"") >&5
15160   (eval $ac_link) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit "$ac_status"); } &&
15164          { ac_try='test -s "conftest$ac_exeext"'
15165   { (eval echo "$as_me:15165: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:15168: \$? = $ac_status" >&5
15169   (exit "$ac_status"); }; }; then
15170   cf_cv_utf8_lib=yes
15171 else
15172   echo "$as_me: failed program was:" >&5
15173 cat "conftest.$ac_ext" >&5
15174
15175 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
15176 # will be set on completion of the AC_TRY_LINK below.
15177 cf_cv_header_path_utf8=
15178 cf_cv_library_path_utf8=
15179
15180 echo "${as_me:-configure}:15180: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
15181
15182 cf_save_LIBS="$LIBS"
15183
15184 cat >"conftest.$ac_ext" <<_ACEOF
15185 #line 15185 "configure"
15186 #include "confdefs.h"
15187
15188 #include <libutf8.h>
15189 int
15190 main (void)
15191 {
15192 putwc(0,0);
15193   ;
15194   return 0;
15195 }
15196 _ACEOF
15197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15198 if { (eval echo "$as_me:15198: \"$ac_link\"") >&5
15199   (eval $ac_link) 2>&5
15200   ac_status=$?
15201   echo "$as_me:15201: \$? = $ac_status" >&5
15202   (exit "$ac_status"); } &&
15203          { ac_try='test -s "conftest$ac_exeext"'
15204   { (eval echo "$as_me:15204: \"$ac_try\"") >&5
15205   (eval $ac_try) 2>&5
15206   ac_status=$?
15207   echo "$as_me:15207: \$? = $ac_status" >&5
15208   (exit "$ac_status"); }; }; then
15209
15210         cf_cv_find_linkage_utf8=yes
15211         cf_cv_header_path_utf8=/usr/include
15212         cf_cv_library_path_utf8=/usr/lib
15213
15214 else
15215   echo "$as_me: failed program was:" >&5
15216 cat "conftest.$ac_ext" >&5
15217
15218 LIBS="-lutf8  $cf_save_LIBS"
15219
15220 cat >"conftest.$ac_ext" <<_ACEOF
15221 #line 15221 "configure"
15222 #include "confdefs.h"
15223
15224 #include <libutf8.h>
15225 int
15226 main (void)
15227 {
15228 putwc(0,0);
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15234 if { (eval echo "$as_me:15234: \"$ac_link\"") >&5
15235   (eval $ac_link) 2>&5
15236   ac_status=$?
15237   echo "$as_me:15237: \$? = $ac_status" >&5
15238   (exit "$ac_status"); } &&
15239          { ac_try='test -s "conftest$ac_exeext"'
15240   { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15241   (eval $ac_try) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit "$ac_status"); }; }; then
15245
15246         cf_cv_find_linkage_utf8=yes
15247         cf_cv_header_path_utf8=/usr/include
15248         cf_cv_library_path_utf8=/usr/lib
15249         cf_cv_library_file_utf8="-lutf8"
15250
15251 else
15252   echo "$as_me: failed program was:" >&5
15253 cat "conftest.$ac_ext" >&5
15254
15255         cf_cv_find_linkage_utf8=no
15256         LIBS="$cf_save_LIBS"
15257
15258         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
15259
15260 echo "${as_me:-configure}:15260: testing find linkage for utf8 library ..." 1>&5
15261
15262 echo "${as_me:-configure}:15262: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
15263
15264         cf_save_CPPFLAGS="$CPPFLAGS"
15265         cf_test_CPPFLAGS="$CPPFLAGS"
15266
15267 cf_search=
15268
15269 # collect the current set of include-directories from compiler flags
15270 cf_header_path_list=""
15271 if test -n "${CFLAGS}${CPPFLAGS}" ; then
15272         for cf_header_path in $CPPFLAGS $CFLAGS
15273         do
15274                 case "$cf_header_path" in
15275                 (-I*)
15276                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
15277
15278 test "x$cf_header_path" != "xNONE" && \
15279 test -d "$cf_header_path" && \
15280  {
15281         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
15282         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
15283         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
15284         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
15285         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
15286         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
15287 }
15288
15289                         cf_header_path_list="$cf_header_path_list $cf_search"
15290                         ;;
15291                 esac
15292         done
15293 fi
15294
15295 # add the variations for the package we are looking for
15296
15297 cf_search=
15298
15299 test "x$prefix" != "xNONE" && \
15300 test -d "$prefix" && \
15301  {
15302         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
15303         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
15304         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
15305         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
15306         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
15307         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
15308 }
15309
15310 for cf_subdir_prefix in \
15311         /usr \
15312         /usr/local \
15313         /usr/pkg \
15314         /opt \
15315         /opt/local \
15316         $HOME
15317 do
15318
15319 test "x$cf_subdir_prefix" != "x$prefix" && \
15320 test -d "$cf_subdir_prefix" && \
15321 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15322         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
15323         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
15324         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
15325         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
15326         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
15327         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
15328 }
15329
15330 done
15331
15332 test "$includedir" != NONE && \
15333 test "$includedir" != "/usr/include" && \
15334 test -d "$includedir" && {
15335         test -d "$includedir" &&    cf_search="$cf_search $includedir"
15336         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
15337 }
15338
15339 test "$oldincludedir" != NONE && \
15340 test "$oldincludedir" != "/usr/include" && \
15341 test -d "$oldincludedir" && {
15342         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
15343         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
15344 }
15345
15346 cf_search="$cf_search $cf_header_path_list"
15347
15348         for cf_cv_header_path_utf8 in $cf_search
15349         do
15350                 if test -d "$cf_cv_header_path_utf8" ; then
15351                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
15352
15353 echo "${as_me:-configure}:15353: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
15354
15355                         CPPFLAGS="$cf_save_CPPFLAGS"
15356
15357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15358         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
15359
15360                         cat >"conftest.$ac_ext" <<_ACEOF
15361 #line 15361 "configure"
15362 #include "confdefs.h"
15363
15364 #include <libutf8.h>
15365 int
15366 main (void)
15367 {
15368 putwc(0,0);
15369   ;
15370   return 0;
15371 }
15372 _ACEOF
15373 rm -f "conftest.$ac_objext"
15374 if { (eval echo "$as_me:15374: \"$ac_compile\"") >&5
15375   (eval $ac_compile) 2>&5
15376   ac_status=$?
15377   echo "$as_me:15377: \$? = $ac_status" >&5
15378   (exit "$ac_status"); } &&
15379          { ac_try='test -s "conftest.$ac_objext"'
15380   { (eval echo "$as_me:15380: \"$ac_try\"") >&5
15381   (eval $ac_try) 2>&5
15382   ac_status=$?
15383   echo "$as_me:15383: \$? = $ac_status" >&5
15384   (exit "$ac_status"); }; }; then
15385
15386                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
15387
15388 echo "${as_me:-configure}:15388: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
15389
15390                                 cf_cv_find_linkage_utf8=maybe
15391                                 cf_test_CPPFLAGS="$CPPFLAGS"
15392                                 break
15393 else
15394   echo "$as_me: failed program was:" >&5
15395 cat "conftest.$ac_ext" >&5
15396
15397                                 CPPFLAGS="$cf_save_CPPFLAGS"
15398
15399 fi
15400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15401                 fi
15402         done
15403
15404         if test "$cf_cv_find_linkage_utf8" = maybe ; then
15405
15406 echo "${as_me:-configure}:15406: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
15407
15408                 cf_save_LIBS="$LIBS"
15409                 cf_save_LDFLAGS="$LDFLAGS"
15410
15411                 if test "$cf_cv_find_linkage_utf8" != yes ; then
15412
15413 cf_search=
15414 cf_library_path_list=""
15415 if test -n "${LDFLAGS}${LIBS}" ; then
15416         for cf_library_path in $LDFLAGS $LIBS
15417         do
15418                 case "$cf_library_path" in
15419                 (-L*)
15420                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15421
15422 test "x$cf_library_path" != "xNONE" && \
15423 test -d "$cf_library_path" && \
15424  {
15425         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
15426         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
15427         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
15428         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
15429         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
15430         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
15431 }
15432
15433                         cf_library_path_list="$cf_library_path_list $cf_search"
15434                         ;;
15435                 esac
15436         done
15437 fi
15438
15439 cf_search=
15440
15441 test "x$prefix" != "xNONE" && \
15442 test -d "$prefix" && \
15443  {
15444         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
15445         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
15446         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
15447         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
15448         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
15449         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
15450 }
15451
15452 for cf_subdir_prefix in \
15453         /usr \
15454         /usr/local \
15455         /usr/pkg \
15456         /opt \
15457         /opt/local \
15458         $HOME
15459 do
15460
15461 test "x$cf_subdir_prefix" != "x$prefix" && \
15462 test -d "$cf_subdir_prefix" && \
15463 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15464         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
15465         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
15466         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
15467         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
15468         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
15469         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
15470 }
15471
15472 done
15473
15474 cf_search="$cf_library_path_list $cf_search"
15475
15476                         for cf_cv_library_path_utf8 in $cf_search
15477                         do
15478                                 if test -d "$cf_cv_library_path_utf8" ; then
15479                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
15480
15481 echo "${as_me:-configure}:15481: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
15482
15483                                         CPPFLAGS="$cf_test_CPPFLAGS"
15484                                         LIBS="-lutf8  $cf_save_LIBS"
15485                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
15486                                         cat >"conftest.$ac_ext" <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489
15490 #include <libutf8.h>
15491 int
15492 main (void)
15493 {
15494 putwc(0,0);
15495   ;
15496   return 0;
15497 }
15498 _ACEOF
15499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15500 if { (eval echo "$as_me:15500: \"$ac_link\"") >&5
15501   (eval $ac_link) 2>&5
15502   ac_status=$?
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit "$ac_status"); } &&
15505          { ac_try='test -s "conftest$ac_exeext"'
15506   { (eval echo "$as_me:15506: \"$ac_try\"") >&5
15507   (eval $ac_try) 2>&5
15508   ac_status=$?
15509   echo "$as_me:15509: \$? = $ac_status" >&5
15510   (exit "$ac_status"); }; }; then
15511
15512                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
15513
15514 echo "${as_me:-configure}:15514: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
15515
15516                                         cf_cv_find_linkage_utf8=yes
15517                                         cf_cv_library_file_utf8="-lutf8"
15518                                         break
15519 else
15520   echo "$as_me: failed program was:" >&5
15521 cat "conftest.$ac_ext" >&5
15522
15523                                         CPPFLAGS="$cf_save_CPPFLAGS"
15524                                         LIBS="$cf_save_LIBS"
15525                                         LDFLAGS="$cf_save_LDFLAGS"
15526
15527 fi
15528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15529                                 fi
15530                         done
15531                         CPPFLAGS="$cf_save_CPPFLAGS"
15532                         LDFLAGS="$cf_save_LDFLAGS"
15533                 fi
15534
15535         else
15536                 cf_cv_find_linkage_utf8=no
15537         fi
15538
15539 fi
15540 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15541
15542 fi
15543 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15544
15545 LIBS="$cf_save_LIBS"
15546
15547 if test "$cf_cv_find_linkage_utf8" = yes ; then
15548 cf_cv_utf8_lib=add-on
15549 else
15550 cf_cv_utf8_lib=no
15551 fi
15552
15553 fi
15554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15555 fi
15556 echo "$as_me:15556: result: $cf_cv_utf8_lib" >&5
15557 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
15558
15559 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
15560 # ncurses/ncursesw:
15561 if test "$cf_cv_utf8_lib" = "add-on" ; then
15562
15563 cat >>confdefs.h <<\EOF
15564 #define HAVE_LIBUTF8_H 1
15565 EOF
15566
15567 if test -n "$cf_cv_header_path_utf8" ; then
15568   for cf_add_incdir in $cf_cv_header_path_utf8
15569   do
15570         while test "$cf_add_incdir" != /usr/include
15571         do
15572           if test -d "$cf_add_incdir"
15573           then
15574                 cf_have_incdir=no
15575                 if test -n "$CFLAGS$CPPFLAGS" ; then
15576                   # a loop is needed to ensure we can add subdirs of existing dirs
15577                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15578                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15579                           cf_have_incdir=yes; break
15580                         fi
15581                   done
15582                 fi
15583
15584                 if test "$cf_have_incdir" = no ; then
15585                   if test "$cf_add_incdir" = /usr/local/include ; then
15586                         if test "$GCC" = yes
15587                         then
15588                           cf_save_CPPFLAGS=$CPPFLAGS
15589
15590         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15591         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15592
15593                           cat >"conftest.$ac_ext" <<_ACEOF
15594 #line 15594 "configure"
15595 #include "confdefs.h"
15596 #include <stdio.h>
15597 int
15598 main (void)
15599 {
15600 printf("Hello")
15601   ;
15602   return 0;
15603 }
15604 _ACEOF
15605 rm -f "conftest.$ac_objext"
15606 if { (eval echo "$as_me:15606: \"$ac_compile\"") >&5
15607   (eval $ac_compile) 2>&5
15608   ac_status=$?
15609   echo "$as_me:15609: \$? = $ac_status" >&5
15610   (exit "$ac_status"); } &&
15611          { ac_try='test -s "conftest.$ac_objext"'
15612   { (eval echo "$as_me:15612: \"$ac_try\"") >&5
15613   (eval $ac_try) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit "$ac_status"); }; }; then
15617   :
15618 else
15619   echo "$as_me: failed program was:" >&5
15620 cat "conftest.$ac_ext" >&5
15621 cf_have_incdir=yes
15622 fi
15623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15624                           CPPFLAGS=$cf_save_CPPFLAGS
15625                         fi
15626                   fi
15627                 fi
15628
15629                 if test "$cf_have_incdir" = no ; then
15630                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15631
15632 echo "${as_me:-configure}:15632: testing adding $cf_add_incdir to include-path ..." 1>&5
15633
15634                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15635
15636                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
15637                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15638                   cf_add_incdir="$cf_top_incdir"
15639                 else
15640                   break
15641                 fi
15642           else
15643                 break
15644           fi
15645         done
15646   done
15647 fi
15648
15649 if test -n "$cf_cv_library_path_utf8" ; then
15650         for cf_add_libdir in $cf_cv_library_path_utf8
15651         do
15652                 if test "$cf_add_libdir" = /usr/lib ; then
15653                         :
15654                 elif test -d "$cf_add_libdir"
15655                 then
15656                         cf_have_libdir=no
15657                         if test -n "$LDFLAGS$LIBS" ; then
15658                                 # a loop is needed to ensure we can add subdirs of existing dirs
15659                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
15660                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15661                                                 cf_have_libdir=yes; break
15662                                         fi
15663                                 done
15664                         fi
15665                         if test "$cf_have_libdir" = no ; then
15666                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15667
15668 echo "${as_me:-configure}:15668: testing adding $cf_add_libdir to library-path ..." 1>&5
15669
15670                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15671                         fi
15672                 fi
15673         done
15674 fi
15675
15676 cf_add_libs="$LIBS"
15677 # reverse order
15678 cf_add_0lib=
15679 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15680 # filter duplicates
15681 for cf_add_1lib in $cf_add_0lib; do
15682         for cf_add_2lib in $cf_add_libs; do
15683                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15684                         cf_add_1lib=
15685                         break
15686                 fi
15687         done
15688         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15689 done
15690 LIBS="$cf_add_libs"
15691
15692 fi
15693
15694 cf_ncuconfig_root=$cf_cv_screen
15695 cf_have_ncuconfig=no
15696
15697 if test "x${PKG_CONFIG:=none}" != xnone; then
15698         echo "$as_me:15698: checking pkg-config for $cf_ncuconfig_root" >&5
15699 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
15700         if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
15701                 echo "$as_me:15701: result: yes" >&5
15702 echo "${ECHO_T}yes" >&6
15703
15704                 echo "$as_me:15704: checking if the $cf_ncuconfig_root package files work" >&5
15705 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
15706                 cf_have_ncuconfig=unknown
15707
15708                 cf_save_CFLAGS="$CFLAGS"
15709                 cf_save_CPPFLAGS="$CPPFLAGS"
15710                 cf_save_LIBS="$LIBS"
15711
15712                 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
15713                 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
15714
15715                 # while -W for passing linker flags is prevalent, it is not "standard".
15716                 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
15717                 # incompatible _and_ non-standard -W option which gives an error.  Work
15718                 # around that pitfall.
15719                 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
15720                 (x*c[89]9@@*-W*)
15721
15722 cf_fix_cppflags=no
15723 cf_new_cflags=
15724 cf_new_cppflags=
15725 cf_new_extra_cppflags=
15726
15727 for cf_add_cflags in $cf_pkg_cflags
15728 do
15729 case "$cf_fix_cppflags" in
15730 (no)
15731         case "$cf_add_cflags" in
15732         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15733                 case "$cf_add_cflags" in
15734                 (-D*)
15735                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15736
15737                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15738                                 && test -z "${cf_tst_cflags}" \
15739                                 && cf_fix_cppflags=yes
15740
15741                         if test "$cf_fix_cppflags" = yes ; then
15742
15743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15745
15746                                 continue
15747                         elif test "${cf_tst_cflags}" = "\"'" ; then
15748
15749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15751
15752                                 continue
15753                         fi
15754                         ;;
15755                 esac
15756                 case "$CPPFLAGS" in
15757                 (*$cf_add_cflags)
15758                         ;;
15759                 (*)
15760                         case "$cf_add_cflags" in
15761                         (-D*)
15762                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15763
15764 CPPFLAGS=`echo "$CPPFLAGS" | \
15765         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15766                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15767
15768                                 ;;
15769                         esac
15770
15771         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15772         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15773
15774                         ;;
15775                 esac
15776                 ;;
15777         (*)
15778
15779         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15780         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15781
15782                 ;;
15783         esac
15784         ;;
15785 (yes)
15786
15787         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15788         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15789
15790         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15791
15792         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15793                 && test -z "${cf_tst_cflags}" \
15794                 && cf_fix_cppflags=no
15795         ;;
15796 esac
15797 done
15798
15799 if test -n "$cf_new_cflags" ; then
15800
15801         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15802         CFLAGS="${CFLAGS}$cf_new_cflags"
15803
15804 fi
15805
15806 if test -n "$cf_new_cppflags" ; then
15807
15808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15809         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15810
15811 fi
15812
15813 if test -n "$cf_new_extra_cppflags" ; then
15814
15815         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15816         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15817
15818 fi
15819
15820 cf_add_libs="$LIBS"
15821 # reverse order
15822 cf_add_0lib=
15823 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15824 # filter duplicates
15825 for cf_add_1lib in $cf_add_0lib; do
15826         for cf_add_2lib in $cf_add_libs; do
15827                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15828                         cf_add_1lib=
15829                         break
15830                 fi
15831         done
15832         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15833 done
15834 LIBS="$cf_add_libs"
15835
15836                         cat >"conftest.$ac_ext" <<_ACEOF
15837 #line 15837 "configure"
15838 #include "confdefs.h"
15839 #include <${cf_cv_ncurses_header:-curses.h}>
15840 int
15841 main (void)
15842 {
15843 initscr(); mousemask(0,0); tigetstr((char *)0);
15844   ;
15845   return 0;
15846 }
15847 _ACEOF
15848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15849 if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
15850   (eval $ac_link) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit "$ac_status"); } &&
15854          { ac_try='test -s "conftest$ac_exeext"'
15855   { (eval echo "$as_me:15855: \"$ac_try\"") >&5
15856   (eval $ac_try) 2>&5
15857   ac_status=$?
15858   echo "$as_me:15858: \$? = $ac_status" >&5
15859   (exit "$ac_status"); }; }; then
15860   if test "$cross_compiling" = yes; then
15861   cf_test_ncuconfig=maybe
15862 else
15863   cat >"conftest.$ac_ext" <<_ACEOF
15864 #line 15864 "configure"
15865 #include "confdefs.h"
15866 #include <${cf_cv_ncurses_header:-curses.h}>
15867                                         int main(void)
15868                                         { char *xx = curses_version(); return (xx == 0); }
15869 _ACEOF
15870 rm -f "conftest$ac_exeext"
15871 if { (eval echo "$as_me:15871: \"$ac_link\"") >&5
15872   (eval $ac_link) 2>&5
15873   ac_status=$?
15874   echo "$as_me:15874: \$? = $ac_status" >&5
15875   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15876   { (eval echo "$as_me:15876: \"$ac_try\"") >&5
15877   (eval $ac_try) 2>&5
15878   ac_status=$?
15879   echo "$as_me:15879: \$? = $ac_status" >&5
15880   (exit "$ac_status"); }; }; then
15881   cf_test_ncuconfig=yes
15882 else
15883   echo "$as_me: program exited with status $ac_status" >&5
15884 echo "$as_me: failed program was:" >&5
15885 cat "conftest.$ac_ext" >&5
15886 cf_test_ncuconfig=no
15887 fi
15888 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15889 fi
15890 else
15891   echo "$as_me: failed program was:" >&5
15892 cat "conftest.$ac_ext" >&5
15893 cf_test_ncuconfig=no
15894 fi
15895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15896
15897                         CFLAGS="$cf_save_CFLAGS"
15898                         CPPFLAGS="$cf_save_CPPFLAGS"
15899                         LIBS="$cf_save_LIBS"
15900
15901                         if test "x$cf_test_ncuconfig" != xyes; then
15902                                 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^      ]*//g'`
15903                                 cf_pkg_cflags="$cf_temp"
15904                                 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^        ]*//g'`
15905                                 cf_pkg_libs="$cf_temp"
15906                         fi
15907                         ;;
15908                 esac
15909
15910 cf_fix_cppflags=no
15911 cf_new_cflags=
15912 cf_new_cppflags=
15913 cf_new_extra_cppflags=
15914
15915 for cf_add_cflags in $cf_pkg_cflags
15916 do
15917 case "$cf_fix_cppflags" in
15918 (no)
15919         case "$cf_add_cflags" in
15920         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15921                 case "$cf_add_cflags" in
15922                 (-D*)
15923                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15924
15925                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15926                                 && test -z "${cf_tst_cflags}" \
15927                                 && cf_fix_cppflags=yes
15928
15929                         if test "$cf_fix_cppflags" = yes ; then
15930
15931         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15932         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15933
15934                                 continue
15935                         elif test "${cf_tst_cflags}" = "\"'" ; then
15936
15937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15939
15940                                 continue
15941                         fi
15942                         ;;
15943                 esac
15944                 case "$CPPFLAGS" in
15945                 (*$cf_add_cflags)
15946                         ;;
15947                 (*)
15948                         case "$cf_add_cflags" in
15949                         (-D*)
15950                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15951
15952 CPPFLAGS=`echo "$CPPFLAGS" | \
15953         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15954                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15955
15956                                 ;;
15957                         esac
15958
15959         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15960         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15961
15962                         ;;
15963                 esac
15964                 ;;
15965         (*)
15966
15967         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15968         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15969
15970                 ;;
15971         esac
15972         ;;
15973 (yes)
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         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15979
15980         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15981                 && test -z "${cf_tst_cflags}" \
15982                 && cf_fix_cppflags=no
15983         ;;
15984 esac
15985 done
15986
15987 if test -n "$cf_new_cflags" ; then
15988
15989         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15990         CFLAGS="${CFLAGS}$cf_new_cflags"
15991
15992 fi
15993
15994 if test -n "$cf_new_cppflags" ; then
15995
15996         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15997         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15998
15999 fi
16000
16001 if test -n "$cf_new_extra_cppflags" ; then
16002
16003         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16004         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16005
16006 fi
16007
16008 cf_add_libs="$LIBS"
16009 # reverse order
16010 cf_add_0lib=
16011 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16012 # filter duplicates
16013 for cf_add_1lib in $cf_add_0lib; do
16014         for cf_add_2lib in $cf_add_libs; do
16015                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16016                         cf_add_1lib=
16017                         break
16018                 fi
16019         done
16020         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16021 done
16022 LIBS="$cf_add_libs"
16023
16024                 cat >"conftest.$ac_ext" <<_ACEOF
16025 #line 16025 "configure"
16026 #include "confdefs.h"
16027 #include <${cf_cv_ncurses_header:-curses.h}>
16028 int
16029 main (void)
16030 {
16031 initscr(); mousemask(0,0); tigetstr((char *)0);
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16037 if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit "$ac_status"); } &&
16042          { ac_try='test -s "conftest$ac_exeext"'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit "$ac_status"); }; }; then
16048   if test "$cross_compiling" = yes; then
16049   cf_have_ncuconfig=maybe
16050 else
16051   cat >"conftest.$ac_ext" <<_ACEOF
16052 #line 16052 "configure"
16053 #include "confdefs.h"
16054 #include <${cf_cv_ncurses_header:-curses.h}>
16055                                 int main(void)
16056                                 { char *xx = curses_version(); return (xx == 0); }
16057 _ACEOF
16058 rm -f "conftest$ac_exeext"
16059 if { (eval echo "$as_me:16059: \"$ac_link\"") >&5
16060   (eval $ac_link) 2>&5
16061   ac_status=$?
16062   echo "$as_me:16062: \$? = $ac_status" >&5
16063   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16064   { (eval echo "$as_me:16064: \"$ac_try\"") >&5
16065   (eval $ac_try) 2>&5
16066   ac_status=$?
16067   echo "$as_me:16067: \$? = $ac_status" >&5
16068   (exit "$ac_status"); }; }; then
16069   cf_have_ncuconfig=yes
16070 else
16071   echo "$as_me: program exited with status $ac_status" >&5
16072 echo "$as_me: failed program was:" >&5
16073 cat "conftest.$ac_ext" >&5
16074 cf_have_ncuconfig=no
16075 fi
16076 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16077 fi
16078 else
16079   echo "$as_me: failed program was:" >&5
16080 cat "conftest.$ac_ext" >&5
16081 cf_have_ncuconfig=no
16082 fi
16083 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16084                 echo "$as_me:16084: result: $cf_have_ncuconfig" >&5
16085 echo "${ECHO_T}$cf_have_ncuconfig" >&6
16086                 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
16087                 if test "$cf_have_ncuconfig" != "yes"
16088                 then
16089                         CPPFLAGS="$cf_save_CPPFLAGS"
16090                         LIBS="$cf_save_LIBS"
16091                         NCURSES_CONFIG_PKG=none
16092                 else
16093
16094 cat >>confdefs.h <<\EOF
16095 #define NCURSES 1
16096 EOF
16097
16098                         NCURSES_CONFIG_PKG=$cf_ncuconfig_root
16099
16100 echo "$as_me:16100: checking for terminfo header" >&5
16101 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16102 if test "${cf_cv_term_header+set}" = set; then
16103   echo $ECHO_N "(cached) $ECHO_C" >&6
16104 else
16105
16106 case "${cf_cv_ncurses_header}" in
16107 (*/ncurses.h|*/ncursesw.h)
16108         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16109         ;;
16110 (*)
16111         cf_term_header=term.h
16112         ;;
16113 esac
16114
16115 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16116 do
16117 cat >"conftest.$ac_ext" <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120 #include <stdio.h>
16121 #include <${cf_cv_ncurses_header:-curses.h}>
16122 #include <$cf_test>
16123
16124 int
16125 main (void)
16126 {
16127 int x = auto_left_margin; (void)x
16128   ;
16129   return 0;
16130 }
16131 _ACEOF
16132 rm -f "conftest.$ac_objext"
16133 if { (eval echo "$as_me:16133: \"$ac_compile\"") >&5
16134   (eval $ac_compile) 2>&5
16135   ac_status=$?
16136   echo "$as_me:16136: \$? = $ac_status" >&5
16137   (exit "$ac_status"); } &&
16138          { ac_try='test -s "conftest.$ac_objext"'
16139   { (eval echo "$as_me:16139: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit "$ac_status"); }; }; then
16144
16145         cf_cv_term_header="$cf_test"
16146 else
16147   echo "$as_me: failed program was:" >&5
16148 cat "conftest.$ac_ext" >&5
16149
16150         cf_cv_term_header=unknown
16151
16152 fi
16153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16154         test "$cf_cv_term_header" != unknown && break
16155 done
16156
16157 fi
16158 echo "$as_me:16158: result: $cf_cv_term_header" >&5
16159 echo "${ECHO_T}$cf_cv_term_header" >&6
16160
16161 # Set definitions to allow ifdef'ing to accommodate subdirectories
16162
16163 case "$cf_cv_term_header" in
16164 (*term.h)
16165
16166 cat >>confdefs.h <<\EOF
16167 #define HAVE_TERM_H 1
16168 EOF
16169
16170         ;;
16171 esac
16172
16173 case "$cf_cv_term_header" in
16174 (ncurses/term.h)
16175
16176 cat >>confdefs.h <<\EOF
16177 #define HAVE_NCURSES_TERM_H 1
16178 EOF
16179
16180         ;;
16181 (ncursesw/term.h)
16182
16183 cat >>confdefs.h <<\EOF
16184 #define HAVE_NCURSESW_TERM_H 1
16185 EOF
16186
16187         ;;
16188 esac
16189
16190                 fi
16191
16192         else
16193                 echo "$as_me:16193: result: no" >&5
16194 echo "${ECHO_T}no" >&6
16195                 NCURSES_CONFIG_PKG=none
16196         fi
16197 else
16198         NCURSES_CONFIG_PKG=none
16199 fi
16200
16201 if test "x$cf_have_ncuconfig" = "xno"; then
16202         cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
16203
16204 if test -n "$ac_tool_prefix"; then
16205   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16206   do
16207     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16208 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16209 echo "$as_me:16209: checking for $ac_word" >&5
16210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16211 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
16212   echo $ECHO_N "(cached) $ECHO_C" >&6
16213 else
16214   if test -n "$NCURSES_CONFIG"; then
16215   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
16216 else
16217   ac_save_IFS=$IFS; IFS=$ac_path_separator
16218 ac_dummy="$PATH"
16219 for ac_dir in $ac_dummy; do
16220   IFS=$ac_save_IFS
16221   test -z "$ac_dir" && ac_dir=.
16222   $as_executable_p "$ac_dir/$ac_word" || continue
16223 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16224 echo "$as_me:16224: found $ac_dir/$ac_word" >&5
16225 break
16226 done
16227
16228 fi
16229 fi
16230 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
16231 if test -n "$NCURSES_CONFIG"; then
16232   echo "$as_me:16232: result: $NCURSES_CONFIG" >&5
16233 echo "${ECHO_T}$NCURSES_CONFIG" >&6
16234 else
16235   echo "$as_me:16235: result: no" >&5
16236 echo "${ECHO_T}no" >&6
16237 fi
16238
16239     test -n "$NCURSES_CONFIG" && break
16240   done
16241 fi
16242 if test -z "$NCURSES_CONFIG"; then
16243   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
16244   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16245 do
16246   # Extract the first word of "$ac_prog", so it can be a program name with args.
16247 set dummy $ac_prog; ac_word=$2
16248 echo "$as_me:16248: checking for $ac_word" >&5
16249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16250 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
16251   echo $ECHO_N "(cached) $ECHO_C" >&6
16252 else
16253   if test -n "$ac_ct_NCURSES_CONFIG"; then
16254   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
16255 else
16256   ac_save_IFS=$IFS; IFS=$ac_path_separator
16257 ac_dummy="$PATH"
16258 for ac_dir in $ac_dummy; do
16259   IFS=$ac_save_IFS
16260   test -z "$ac_dir" && ac_dir=.
16261   $as_executable_p "$ac_dir/$ac_word" || continue
16262 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
16263 echo "$as_me:16263: found $ac_dir/$ac_word" >&5
16264 break
16265 done
16266
16267 fi
16268 fi
16269 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
16270 if test -n "$ac_ct_NCURSES_CONFIG"; then
16271   echo "$as_me:16271: result: $ac_ct_NCURSES_CONFIG" >&5
16272 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
16273 else
16274   echo "$as_me:16274: result: no" >&5
16275 echo "${ECHO_T}no" >&6
16276 fi
16277
16278   test -n "$ac_ct_NCURSES_CONFIG" && break
16279 done
16280 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
16281
16282   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
16283 fi
16284
16285         if test "$NCURSES_CONFIG" != none ; then
16286
16287 cf_fix_cppflags=no
16288 cf_new_cflags=
16289 cf_new_cppflags=
16290 cf_new_extra_cppflags=
16291
16292 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
16293 do
16294 case "$cf_fix_cppflags" in
16295 (no)
16296         case "$cf_add_cflags" in
16297         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16298                 case "$cf_add_cflags" in
16299                 (-D*)
16300                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16301
16302                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16303                                 && test -z "${cf_tst_cflags}" \
16304                                 && cf_fix_cppflags=yes
16305
16306                         if test "$cf_fix_cppflags" = yes ; then
16307
16308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16310
16311                                 continue
16312                         elif test "${cf_tst_cflags}" = "\"'" ; then
16313
16314         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16315         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16316
16317                                 continue
16318                         fi
16319                         ;;
16320                 esac
16321                 case "$CPPFLAGS" in
16322                 (*$cf_add_cflags)
16323                         ;;
16324                 (*)
16325                         case "$cf_add_cflags" in
16326                         (-D*)
16327                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16328
16329 CPPFLAGS=`echo "$CPPFLAGS" | \
16330         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16331                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16332
16333                                 ;;
16334                         esac
16335
16336         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16337         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16338
16339                         ;;
16340                 esac
16341                 ;;
16342         (*)
16343
16344         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16345         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16346
16347                 ;;
16348         esac
16349         ;;
16350 (yes)
16351
16352         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16353         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16354
16355         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16356
16357         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16358                 && test -z "${cf_tst_cflags}" \
16359                 && cf_fix_cppflags=no
16360         ;;
16361 esac
16362 done
16363
16364 if test -n "$cf_new_cflags" ; then
16365
16366         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16367         CFLAGS="${CFLAGS}$cf_new_cflags"
16368
16369 fi
16370
16371 if test -n "$cf_new_cppflags" ; then
16372
16373         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16374         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16375
16376 fi
16377
16378 if test -n "$cf_new_extra_cppflags" ; then
16379
16380         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16381         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16382
16383 fi
16384
16385 cf_add_libs="$LIBS"
16386 # reverse order
16387 cf_add_0lib=
16388 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16389 # filter duplicates
16390 for cf_add_1lib in $cf_add_0lib; do
16391         for cf_add_2lib in $cf_add_libs; do
16392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16393                         cf_add_1lib=
16394                         break
16395                 fi
16396         done
16397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16398 done
16399 LIBS="$cf_add_libs"
16400
16401                 # even with config script, some packages use no-override for curses.h
16402
16403 echo "$as_me:16403: checking if we have identified curses headers" >&5
16404 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16405 if test "${cf_cv_ncurses_header+set}" = set; then
16406   echo $ECHO_N "(cached) $ECHO_C" >&6
16407 else
16408
16409 cf_cv_ncurses_header=none
16410 for cf_header in \
16411         ncurses.h $cf_cv_screen/ncurses.h \
16412         curses.h $cf_cv_screen/curses.h
16413 do
16414 cat >"conftest.$ac_ext" <<_ACEOF
16415 #line 16415 "configure"
16416 #include "confdefs.h"
16417 #include <${cf_header}>
16418 int
16419 main (void)
16420 {
16421 initscr(); tgoto("?", 0,0)
16422   ;
16423   return 0;
16424 }
16425 _ACEOF
16426 rm -f "conftest.$ac_objext"
16427 if { (eval echo "$as_me:16427: \"$ac_compile\"") >&5
16428   (eval $ac_compile) 2>&5
16429   ac_status=$?
16430   echo "$as_me:16430: \$? = $ac_status" >&5
16431   (exit "$ac_status"); } &&
16432          { ac_try='test -s "conftest.$ac_objext"'
16433   { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434   (eval $ac_try) 2>&5
16435   ac_status=$?
16436   echo "$as_me:16436: \$? = $ac_status" >&5
16437   (exit "$ac_status"); }; }; then
16438   cf_cv_ncurses_header=$cf_header; break
16439 else
16440   echo "$as_me: failed program was:" >&5
16441 cat "conftest.$ac_ext" >&5
16442 fi
16443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16444 done
16445
16446 fi
16447 echo "$as_me:16447: result: $cf_cv_ncurses_header" >&5
16448 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16449
16450 if test "$cf_cv_ncurses_header" = none ; then
16451         { { echo "$as_me:16451: error: No curses header-files found" >&5
16452 echo "$as_me: error: No curses header-files found" >&2;}
16453    { (exit 1); exit 1; }; }
16454 fi
16455
16456 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16457
16458 for ac_header in $cf_cv_ncurses_header
16459 do
16460 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16461 echo "$as_me:16461: checking for $ac_header" >&5
16462 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16464   echo $ECHO_N "(cached) $ECHO_C" >&6
16465 else
16466   cat >"conftest.$ac_ext" <<_ACEOF
16467 #line 16467 "configure"
16468 #include "confdefs.h"
16469 #include <$ac_header>
16470 _ACEOF
16471 if { (eval echo "$as_me:16471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16472   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16473   ac_status=$?
16474   $EGREP -v '^ *\+' conftest.er1 >conftest.err
16475   rm -f conftest.er1
16476   cat conftest.err >&5
16477   echo "$as_me:16477: \$? = $ac_status" >&5
16478   (exit "$ac_status"); } >/dev/null; then
16479   if test -s conftest.err; then
16480     ac_cpp_err=$ac_c_preproc_warn_flag
16481   else
16482     ac_cpp_err=
16483   fi
16484 else
16485   ac_cpp_err=yes
16486 fi
16487 if test -z "$ac_cpp_err"; then
16488   eval "$as_ac_Header=yes"
16489 else
16490   echo "$as_me: failed program was:" >&5
16491   cat "conftest.$ac_ext" >&5
16492   eval "$as_ac_Header=no"
16493 fi
16494 rm -f conftest.err "conftest.$ac_ext"
16495 fi
16496 echo "$as_me:16496: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16497 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16498 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16499   cat >>confdefs.h <<EOF
16500 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16501 EOF
16502
16503 fi
16504 done
16505
16506 cat >>confdefs.h <<\EOF
16507 #define NCURSES 1
16508 EOF
16509
16510 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16511
16512                 cat >>confdefs.h <<EOF
16513 #define $cf_nculib_ROOT 1
16514 EOF
16515
16516                                 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
16517
16518         else
16519
16520 cf_ncuhdr_root=$cf_cv_screen
16521
16522 test -n "$cf_cv_curses_dir" && \
16523 test "$cf_cv_curses_dir" != "no" && { \
16524
16525 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
16526   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
16527   do
16528         while test "$cf_add_incdir" != /usr/include
16529         do
16530           if test -d "$cf_add_incdir"
16531           then
16532                 cf_have_incdir=no
16533                 if test -n "$CFLAGS$CPPFLAGS" ; then
16534                   # a loop is needed to ensure we can add subdirs of existing dirs
16535                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16536                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16537                           cf_have_incdir=yes; break
16538                         fi
16539                   done
16540                 fi
16541
16542                 if test "$cf_have_incdir" = no ; then
16543                   if test "$cf_add_incdir" = /usr/local/include ; then
16544                         if test "$GCC" = yes
16545                         then
16546                           cf_save_CPPFLAGS=$CPPFLAGS
16547
16548         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16549         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16550
16551                           cat >"conftest.$ac_ext" <<_ACEOF
16552 #line 16552 "configure"
16553 #include "confdefs.h"
16554 #include <stdio.h>
16555 int
16556 main (void)
16557 {
16558 printf("Hello")
16559   ;
16560   return 0;
16561 }
16562 _ACEOF
16563 rm -f "conftest.$ac_objext"
16564 if { (eval echo "$as_me:16564: \"$ac_compile\"") >&5
16565   (eval $ac_compile) 2>&5
16566   ac_status=$?
16567   echo "$as_me:16567: \$? = $ac_status" >&5
16568   (exit "$ac_status"); } &&
16569          { ac_try='test -s "conftest.$ac_objext"'
16570   { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit "$ac_status"); }; }; then
16575   :
16576 else
16577   echo "$as_me: failed program was:" >&5
16578 cat "conftest.$ac_ext" >&5
16579 cf_have_incdir=yes
16580 fi
16581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16582                           CPPFLAGS=$cf_save_CPPFLAGS
16583                         fi
16584                   fi
16585                 fi
16586
16587                 if test "$cf_have_incdir" = no ; then
16588                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16589
16590 echo "${as_me:-configure}:16590: testing adding $cf_add_incdir to include-path ..." 1>&5
16591
16592                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16593
16594                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16595                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16596                   cf_add_incdir="$cf_top_incdir"
16597                 else
16598                   break
16599                 fi
16600           else
16601                 break
16602           fi
16603         done
16604   done
16605 fi
16606
16607 }
16608
16609 echo "$as_me:16609: checking for $cf_ncuhdr_root header in include-path" >&5
16610 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
16611 if test "${cf_cv_ncurses_h+set}" = set; then
16612   echo $ECHO_N "(cached) $ECHO_C" >&6
16613 else
16614
16615         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
16616         { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
16617         for cf_header in $cf_header_list
16618         do
16619
16620         cat >"conftest.$ac_ext" <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623
16624 #include <$cf_header>
16625 int
16626 main (void)
16627 {
16628
16629 #ifdef NCURSES_VERSION
16630
16631 printf("%s\\n", NCURSES_VERSION);
16632 #else
16633 #ifdef __NCURSES_H
16634 printf("old\\n");
16635 #else
16636         make an error
16637 #endif
16638 #endif
16639
16640   ;
16641   return 0;
16642 }
16643 _ACEOF
16644 rm -f "conftest.$ac_objext"
16645 if { (eval echo "$as_me:16645: \"$ac_compile\"") >&5
16646   (eval $ac_compile) 2>&5
16647   ac_status=$?
16648   echo "$as_me:16648: \$? = $ac_status" >&5
16649   (exit "$ac_status"); } &&
16650          { ac_try='test -s "conftest.$ac_objext"'
16651   { (eval echo "$as_me:16651: \"$ac_try\"") >&5
16652   (eval $ac_try) 2>&5
16653   ac_status=$?
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit "$ac_status"); }; }; then
16656   cf_cv_ncurses_h=$cf_header
16657
16658 else
16659   echo "$as_me: failed program was:" >&5
16660 cat "conftest.$ac_ext" >&5
16661 cf_cv_ncurses_h=no
16662 fi
16663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16664
16665                 test "$cf_cv_ncurses_h" != no && break
16666         done
16667
16668 fi
16669 echo "$as_me:16669: result: $cf_cv_ncurses_h" >&5
16670 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
16671
16672 if test "$cf_cv_ncurses_h" != no ; then
16673         cf_cv_ncurses_header=$cf_cv_ncurses_h
16674 else
16675
16676 echo "$as_me:16676: checking for $cf_ncuhdr_root include-path" >&5
16677 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
16678 if test "${cf_cv_ncurses_h2+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681
16682         test -n "$verbose" && echo
16683
16684 cf_search=
16685
16686 # collect the current set of include-directories from compiler flags
16687 cf_header_path_list=""
16688 if test -n "${CFLAGS}${CPPFLAGS}" ; then
16689         for cf_header_path in $CPPFLAGS $CFLAGS
16690         do
16691                 case "$cf_header_path" in
16692                 (-I*)
16693                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16694
16695 test "x$cf_header_path" != "xNONE" && \
16696 test -d "$cf_header_path" && \
16697  {
16698         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
16699         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
16700         test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
16701         test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
16702         test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
16703         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"
16704 }
16705
16706                         cf_header_path_list="$cf_header_path_list $cf_search"
16707                         ;;
16708                 esac
16709         done
16710 fi
16711
16712 # add the variations for the package we are looking for
16713
16714 cf_search=
16715
16716 test "x$prefix" != "xNONE" && \
16717 test -d "$prefix" && \
16718  {
16719         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
16720         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
16721         test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
16722         test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
16723         test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
16724         test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16725 }
16726
16727 for cf_subdir_prefix in \
16728         /usr \
16729         /usr/local \
16730         /usr/pkg \
16731         /opt \
16732         /opt/local \
16733         $HOME
16734 do
16735
16736 test "x$cf_subdir_prefix" != "x$prefix" && \
16737 test -d "$cf_subdir_prefix" && \
16738 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
16739         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
16740         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
16741         test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
16742         test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
16743         test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
16744         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"
16745 }
16746
16747 done
16748
16749 test "$includedir" != NONE && \
16750 test "$includedir" != "/usr/include" && \
16751 test -d "$includedir" && {
16752         test -d "$includedir" &&    cf_search="$cf_search $includedir"
16753         test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
16754 }
16755
16756 test "$oldincludedir" != NONE && \
16757 test "$oldincludedir" != "/usr/include" && \
16758 test -d "$oldincludedir" && {
16759         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
16760         test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
16761 }
16762
16763 cf_search="$cf_search $cf_header_path_list"
16764
16765         test -n "$verbose" && echo "search path $cf_search"
16766         cf_save2_CPPFLAGS="$CPPFLAGS"
16767         for cf_incdir in $cf_search
16768         do
16769
16770 if test -n "$cf_incdir" ; then
16771   for cf_add_incdir in $cf_incdir
16772   do
16773         while test "$cf_add_incdir" != /usr/include
16774         do
16775           if test -d "$cf_add_incdir"
16776           then
16777                 cf_have_incdir=no
16778                 if test -n "$CFLAGS$CPPFLAGS" ; then
16779                   # a loop is needed to ensure we can add subdirs of existing dirs
16780                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16781                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16782                           cf_have_incdir=yes; break
16783                         fi
16784                   done
16785                 fi
16786
16787                 if test "$cf_have_incdir" = no ; then
16788                   if test "$cf_add_incdir" = /usr/local/include ; then
16789                         if test "$GCC" = yes
16790                         then
16791                           cf_save_CPPFLAGS=$CPPFLAGS
16792
16793         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16794         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16795
16796                           cat >"conftest.$ac_ext" <<_ACEOF
16797 #line 16797 "configure"
16798 #include "confdefs.h"
16799 #include <stdio.h>
16800 int
16801 main (void)
16802 {
16803 printf("Hello")
16804   ;
16805   return 0;
16806 }
16807 _ACEOF
16808 rm -f "conftest.$ac_objext"
16809 if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
16810   (eval $ac_compile) 2>&5
16811   ac_status=$?
16812   echo "$as_me:16812: \$? = $ac_status" >&5
16813   (exit "$ac_status"); } &&
16814          { ac_try='test -s "conftest.$ac_objext"'
16815   { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816   (eval $ac_try) 2>&5
16817   ac_status=$?
16818   echo "$as_me:16818: \$? = $ac_status" >&5
16819   (exit "$ac_status"); }; }; then
16820   :
16821 else
16822   echo "$as_me: failed program was:" >&5
16823 cat "conftest.$ac_ext" >&5
16824 cf_have_incdir=yes
16825 fi
16826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16827                           CPPFLAGS=$cf_save_CPPFLAGS
16828                         fi
16829                   fi
16830                 fi
16831
16832                 if test "$cf_have_incdir" = no ; then
16833                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16834
16835 echo "${as_me:-configure}:16835: testing adding $cf_add_incdir to include-path ..." 1>&5
16836
16837                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16838
16839                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16840                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16841                   cf_add_incdir="$cf_top_incdir"
16842                 else
16843                   break
16844                 fi
16845           else
16846                 break
16847           fi
16848         done
16849   done
16850 fi
16851
16852                 for cf_header in \
16853                         ncurses.h \
16854                         curses.h
16855                 do
16856
16857         cat >"conftest.$ac_ext" <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860
16861 #include <$cf_header>
16862 int
16863 main (void)
16864 {
16865
16866 #ifdef NCURSES_VERSION
16867
16868 printf("%s\\n", NCURSES_VERSION);
16869 #else
16870 #ifdef __NCURSES_H
16871 printf("old\\n");
16872 #else
16873         make an error
16874 #endif
16875 #endif
16876
16877   ;
16878   return 0;
16879 }
16880 _ACEOF
16881 rm -f "conftest.$ac_objext"
16882 if { (eval echo "$as_me:16882: \"$ac_compile\"") >&5
16883   (eval $ac_compile) 2>&5
16884   ac_status=$?
16885   echo "$as_me:16885: \$? = $ac_status" >&5
16886   (exit "$ac_status"); } &&
16887          { ac_try='test -s "conftest.$ac_objext"'
16888   { (eval echo "$as_me:16888: \"$ac_try\"") >&5
16889   (eval $ac_try) 2>&5
16890   ac_status=$?
16891   echo "$as_me:16891: \$? = $ac_status" >&5
16892   (exit "$ac_status"); }; }; then
16893   cf_cv_ncurses_h2=$cf_header
16894
16895 else
16896   echo "$as_me: failed program was:" >&5
16897 cat "conftest.$ac_ext" >&5
16898 cf_cv_ncurses_h2=no
16899 fi
16900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16901
16902                         if test "$cf_cv_ncurses_h2" != no ; then
16903                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
16904                                 test -n "$verbose" && echo $ECHO_N "    ... found $ECHO_C" 1>&6
16905                                 break
16906                         fi
16907                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
16908                 done
16909                 CPPFLAGS="$cf_save2_CPPFLAGS"
16910                 test "$cf_cv_ncurses_h2" != no && break
16911         done
16912         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16912: error: not found" >&5
16913 echo "$as_me: error: not found" >&2;}
16914    { (exit 1); exit 1; }; }
16915
16916 fi
16917 echo "$as_me:16917: result: $cf_cv_ncurses_h2" >&5
16918 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
16919
16920         cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
16921         cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
16922         if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
16923                 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
16924         fi
16925
16926 if test -n "$cf_1st_incdir" ; then
16927   for cf_add_incdir in $cf_1st_incdir
16928   do
16929         while test "$cf_add_incdir" != /usr/include
16930         do
16931           if test -d "$cf_add_incdir"
16932           then
16933                 cf_have_incdir=no
16934                 if test -n "$CFLAGS$CPPFLAGS" ; then
16935                   # a loop is needed to ensure we can add subdirs of existing dirs
16936                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16937                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16938                           cf_have_incdir=yes; break
16939                         fi
16940                   done
16941                 fi
16942
16943                 if test "$cf_have_incdir" = no ; then
16944                   if test "$cf_add_incdir" = /usr/local/include ; then
16945                         if test "$GCC" = yes
16946                         then
16947                           cf_save_CPPFLAGS=$CPPFLAGS
16948
16949         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16950         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16951
16952                           cat >"conftest.$ac_ext" <<_ACEOF
16953 #line 16953 "configure"
16954 #include "confdefs.h"
16955 #include <stdio.h>
16956 int
16957 main (void)
16958 {
16959 printf("Hello")
16960   ;
16961   return 0;
16962 }
16963 _ACEOF
16964 rm -f "conftest.$ac_objext"
16965 if { (eval echo "$as_me:16965: \"$ac_compile\"") >&5
16966   (eval $ac_compile) 2>&5
16967   ac_status=$?
16968   echo "$as_me:16968: \$? = $ac_status" >&5
16969   (exit "$ac_status"); } &&
16970          { ac_try='test -s "conftest.$ac_objext"'
16971   { (eval echo "$as_me:16971: \"$ac_try\"") >&5
16972   (eval $ac_try) 2>&5
16973   ac_status=$?
16974   echo "$as_me:16974: \$? = $ac_status" >&5
16975   (exit "$ac_status"); }; }; then
16976   :
16977 else
16978   echo "$as_me: failed program was:" >&5
16979 cat "conftest.$ac_ext" >&5
16980 cf_have_incdir=yes
16981 fi
16982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16983                           CPPFLAGS=$cf_save_CPPFLAGS
16984                         fi
16985                   fi
16986                 fi
16987
16988                 if test "$cf_have_incdir" = no ; then
16989                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16990
16991 echo "${as_me:-configure}:16991: testing adding $cf_add_incdir to include-path ..." 1>&5
16992
16993                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16994
16995                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16996                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16997                   cf_add_incdir="$cf_top_incdir"
16998                 else
16999                   break
17000                 fi
17001           else
17002                 break
17003           fi
17004         done
17005   done
17006 fi
17007
17008 fi
17009
17010 # Set definitions to allow ifdef'ing for ncurses.h
17011
17012 case "$cf_cv_ncurses_header" in
17013 (*ncurses.h)
17014
17015 cat >>confdefs.h <<\EOF
17016 #define HAVE_NCURSES_H 1
17017 EOF
17018
17019         ;;
17020 esac
17021
17022 case "$cf_cv_ncurses_header" in
17023 (ncurses/curses.h|ncurses/ncurses.h)
17024
17025 cat >>confdefs.h <<\EOF
17026 #define HAVE_NCURSES_NCURSES_H 1
17027 EOF
17028
17029         ;;
17030 (ncursesw/curses.h|ncursesw/ncurses.h)
17031
17032 cat >>confdefs.h <<\EOF
17033 #define HAVE_NCURSESW_NCURSES_H 1
17034 EOF
17035
17036         ;;
17037 esac
17038
17039 echo "$as_me:17039: checking for terminfo header" >&5
17040 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
17041 if test "${cf_cv_term_header+set}" = set; then
17042   echo $ECHO_N "(cached) $ECHO_C" >&6
17043 else
17044
17045 case "${cf_cv_ncurses_header}" in
17046 (*/ncurses.h|*/ncursesw.h)
17047         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
17048         ;;
17049 (*)
17050         cf_term_header=term.h
17051         ;;
17052 esac
17053
17054 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
17055 do
17056 cat >"conftest.$ac_ext" <<_ACEOF
17057 #line 17057 "configure"
17058 #include "confdefs.h"
17059 #include <stdio.h>
17060 #include <${cf_cv_ncurses_header:-curses.h}>
17061 #include <$cf_test>
17062
17063 int
17064 main (void)
17065 {
17066 int x = auto_left_margin; (void)x
17067   ;
17068   return 0;
17069 }
17070 _ACEOF
17071 rm -f "conftest.$ac_objext"
17072 if { (eval echo "$as_me:17072: \"$ac_compile\"") >&5
17073   (eval $ac_compile) 2>&5
17074   ac_status=$?
17075   echo "$as_me:17075: \$? = $ac_status" >&5
17076   (exit "$ac_status"); } &&
17077          { ac_try='test -s "conftest.$ac_objext"'
17078   { (eval echo "$as_me:17078: \"$ac_try\"") >&5
17079   (eval $ac_try) 2>&5
17080   ac_status=$?
17081   echo "$as_me:17081: \$? = $ac_status" >&5
17082   (exit "$ac_status"); }; }; then
17083
17084         cf_cv_term_header="$cf_test"
17085 else
17086   echo "$as_me: failed program was:" >&5
17087 cat "conftest.$ac_ext" >&5
17088
17089         cf_cv_term_header=unknown
17090
17091 fi
17092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17093         test "$cf_cv_term_header" != unknown && break
17094 done
17095
17096 fi
17097 echo "$as_me:17097: result: $cf_cv_term_header" >&5
17098 echo "${ECHO_T}$cf_cv_term_header" >&6
17099
17100 # Set definitions to allow ifdef'ing to accommodate subdirectories
17101
17102 case "$cf_cv_term_header" in
17103 (*term.h)
17104
17105 cat >>confdefs.h <<\EOF
17106 #define HAVE_TERM_H 1
17107 EOF
17108
17109         ;;
17110 esac
17111
17112 case "$cf_cv_term_header" in
17113 (ncurses/term.h)
17114
17115 cat >>confdefs.h <<\EOF
17116 #define HAVE_NCURSES_TERM_H 1
17117 EOF
17118
17119         ;;
17120 (ncursesw/term.h)
17121
17122 cat >>confdefs.h <<\EOF
17123 #define HAVE_NCURSESW_TERM_H 1
17124 EOF
17125
17126         ;;
17127 esac
17128
17129 # some applications need this, but should check for NCURSES_VERSION
17130
17131 cat >>confdefs.h <<\EOF
17132 #define NCURSES 1
17133 EOF
17134
17135 echo "$as_me:17135: checking for ncurses version" >&5
17136 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
17137 if test "${cf_cv_ncurses_version+set}" = set; then
17138   echo $ECHO_N "(cached) $ECHO_C" >&6
17139 else
17140
17141         cf_cv_ncurses_version=no
17142         cf_tempfile=out$$
17143         rm -f "$cf_tempfile"
17144         if test "$cross_compiling" = yes; then
17145
17146         # This will not work if the preprocessor splits the line after the
17147         # Autoconf token.  The 'unproto' program does that.
17148         cat > "conftest.$ac_ext" <<EOF
17149 #include <${cf_cv_ncurses_header:-curses.h}>
17150 #undef Autoconf
17151 #ifdef NCURSES_VERSION
17152 Autoconf NCURSES_VERSION
17153 #else
17154 #ifdef __NCURSES_H
17155 Autoconf "old"
17156 #endif
17157 ;
17158 #endif
17159 EOF
17160         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
17161         { (eval echo "$as_me:17161: \"$cf_try\"") >&5
17162   (eval $cf_try) 2>&5
17163   ac_status=$?
17164   echo "$as_me:17164: \$? = $ac_status" >&5
17165   (exit "$ac_status"); }
17166         if test -f conftest.out ; then
17167                 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
17168                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
17169                 rm -f conftest.out
17170         fi
17171
17172 else
17173   cat >"conftest.$ac_ext" <<_ACEOF
17174 #line 17174 "configure"
17175 #include "confdefs.h"
17176
17177 #include <${cf_cv_ncurses_header:-curses.h}>
17178 #include <stdio.h>
17179 int main(void)
17180 {
17181         FILE *fp = fopen("$cf_tempfile", "w");
17182 #ifdef NCURSES_VERSION
17183 # ifdef NCURSES_VERSION_PATCH
17184         fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
17185 # else
17186         fprintf(fp, "%s\\n", NCURSES_VERSION);
17187 # endif
17188 #else
17189 # ifdef __NCURSES_H
17190         fprintf(fp, "old\\n");
17191 # else
17192         make an error
17193 # endif
17194 #endif
17195         ${cf_cv_main_return:-return}(0);
17196 }
17197 _ACEOF
17198 rm -f "conftest$ac_exeext"
17199 if { (eval echo "$as_me:17199: \"$ac_link\"") >&5
17200   (eval $ac_link) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17204   { (eval echo "$as_me:17204: \"$ac_try\"") >&5
17205   (eval $ac_try) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit "$ac_status"); }; }; then
17209
17210         cf_cv_ncurses_version=`cat $cf_tempfile`
17211 else
17212   echo "$as_me: program exited with status $ac_status" >&5
17213 echo "$as_me: failed program was:" >&5
17214 cat "conftest.$ac_ext" >&5
17215 fi
17216 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17217 fi
17218         rm -f "$cf_tempfile"
17219
17220 fi
17221 echo "$as_me:17221: result: $cf_cv_ncurses_version" >&5
17222 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
17223 test "$cf_cv_ncurses_version" = no ||
17224 cat >>confdefs.h <<\EOF
17225 #define NCURSES 1
17226 EOF
17227
17228 cf_nculib_root=$cf_cv_screen
17229         # This works, except for the special case where we find gpm, but
17230         # ncurses is in a nonstandard location via $LIBS, and we really want
17231         # to link gpm.
17232 cf_ncurses_LIBS=""
17233 cf_ncurses_SAVE="$LIBS"
17234 echo "$as_me:17234: checking for Gpm_Open in -lgpm" >&5
17235 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
17236 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   ac_check_lib_save_LIBS=$LIBS
17240 LIBS="-lgpm  $LIBS"
17241 cat >"conftest.$ac_ext" <<_ACEOF
17242 #line 17242 "configure"
17243 #include "confdefs.h"
17244
17245 /* Override any gcc2 internal prototype to avoid an error.  */
17246 #ifdef __cplusplus
17247 extern "C"
17248 #endif
17249 /* We use char because int might match the return type of a gcc2
17250    builtin and then its argument prototype would still apply.  */
17251 char Gpm_Open ();
17252 int
17253 main (void)
17254 {
17255 Gpm_Open ();
17256   ;
17257   return 0;
17258 }
17259 _ACEOF
17260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17261 if { (eval echo "$as_me:17261: \"$ac_link\"") >&5
17262   (eval $ac_link) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit "$ac_status"); } &&
17266          { ac_try='test -s "conftest$ac_exeext"'
17267   { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268   (eval $ac_try) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit "$ac_status"); }; }; then
17272   ac_cv_lib_gpm_Gpm_Open=yes
17273 else
17274   echo "$as_me: failed program was:" >&5
17275 cat "conftest.$ac_ext" >&5
17276 ac_cv_lib_gpm_Gpm_Open=no
17277 fi
17278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17279 LIBS=$ac_check_lib_save_LIBS
17280 fi
17281 echo "$as_me:17281: result: $ac_cv_lib_gpm_Gpm_Open" >&5
17282 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
17283 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
17284   echo "$as_me:17284: checking for initscr in -lgpm" >&5
17285 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
17286 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
17287   echo $ECHO_N "(cached) $ECHO_C" >&6
17288 else
17289   ac_check_lib_save_LIBS=$LIBS
17290 LIBS="-lgpm  $LIBS"
17291 cat >"conftest.$ac_ext" <<_ACEOF
17292 #line 17292 "configure"
17293 #include "confdefs.h"
17294
17295 /* Override any gcc2 internal prototype to avoid an error.  */
17296 #ifdef __cplusplus
17297 extern "C"
17298 #endif
17299 /* We use char because int might match the return type of a gcc2
17300    builtin and then its argument prototype would still apply.  */
17301 char initscr ();
17302 int
17303 main (void)
17304 {
17305 initscr ();
17306   ;
17307   return 0;
17308 }
17309 _ACEOF
17310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17311 if { (eval echo "$as_me:17311: \"$ac_link\"") >&5
17312   (eval $ac_link) 2>&5
17313   ac_status=$?
17314   echo "$as_me:17314: \$? = $ac_status" >&5
17315   (exit "$ac_status"); } &&
17316          { ac_try='test -s "conftest$ac_exeext"'
17317   { (eval echo "$as_me:17317: \"$ac_try\"") >&5
17318   (eval $ac_try) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit "$ac_status"); }; }; then
17322   ac_cv_lib_gpm_initscr=yes
17323 else
17324   echo "$as_me: failed program was:" >&5
17325 cat "conftest.$ac_ext" >&5
17326 ac_cv_lib_gpm_initscr=no
17327 fi
17328 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17329 LIBS=$ac_check_lib_save_LIBS
17330 fi
17331 echo "$as_me:17331: result: $ac_cv_lib_gpm_initscr" >&5
17332 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
17333 if test "$ac_cv_lib_gpm_initscr" = yes; then
17334   LIBS="$cf_ncurses_SAVE"
17335 else
17336   cf_ncurses_LIBS="-lgpm"
17337 fi
17338
17339 fi
17340
17341 case "$host_os" in
17342 (freebsd*)
17343         # This is only necessary if you are linking against an obsolete
17344         # version of ncurses (but it should do no harm, since it's static).
17345         if test "$cf_nculib_root" = ncurses ; then
17346                 echo "$as_me:17346: checking for tgoto in -lmytinfo" >&5
17347 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
17348 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
17349   echo $ECHO_N "(cached) $ECHO_C" >&6
17350 else
17351   ac_check_lib_save_LIBS=$LIBS
17352 LIBS="-lmytinfo  $LIBS"
17353 cat >"conftest.$ac_ext" <<_ACEOF
17354 #line 17354 "configure"
17355 #include "confdefs.h"
17356
17357 /* Override any gcc2 internal prototype to avoid an error.  */
17358 #ifdef __cplusplus
17359 extern "C"
17360 #endif
17361 /* We use char because int might match the return type of a gcc2
17362    builtin and then its argument prototype would still apply.  */
17363 char tgoto ();
17364 int
17365 main (void)
17366 {
17367 tgoto ();
17368   ;
17369   return 0;
17370 }
17371 _ACEOF
17372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17373 if { (eval echo "$as_me:17373: \"$ac_link\"") >&5
17374   (eval $ac_link) 2>&5
17375   ac_status=$?
17376   echo "$as_me:17376: \$? = $ac_status" >&5
17377   (exit "$ac_status"); } &&
17378          { ac_try='test -s "conftest$ac_exeext"'
17379   { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380   (eval $ac_try) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit "$ac_status"); }; }; then
17384   ac_cv_lib_mytinfo_tgoto=yes
17385 else
17386   echo "$as_me: failed program was:" >&5
17387 cat "conftest.$ac_ext" >&5
17388 ac_cv_lib_mytinfo_tgoto=no
17389 fi
17390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17391 LIBS=$ac_check_lib_save_LIBS
17392 fi
17393 echo "$as_me:17393: result: $ac_cv_lib_mytinfo_tgoto" >&5
17394 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
17395 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
17396   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
17397 fi
17398
17399         fi
17400         ;;
17401 esac
17402
17403 cf_add_libs="$LIBS"
17404 # reverse order
17405 cf_add_0lib=
17406 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17407 # filter duplicates
17408 for cf_add_1lib in $cf_add_0lib; do
17409         for cf_add_2lib in $cf_add_libs; do
17410                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17411                         cf_add_1lib=
17412                         break
17413                 fi
17414         done
17415         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17416 done
17417 LIBS="$cf_add_libs"
17418
17419 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
17420 then
17421
17422 cf_add_libs="$LIBS"
17423 # reverse order
17424 cf_add_0lib=
17425 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17426 # filter duplicates
17427 for cf_add_1lib in $cf_add_0lib; do
17428         for cf_add_2lib in $cf_add_libs; do
17429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17430                         cf_add_1lib=
17431                         break
17432                 fi
17433         done
17434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17435 done
17436 LIBS="$cf_add_libs"
17437
17438 else
17439
17440         eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
17441         cf_libdir=""
17442         echo "$as_me:17442: checking for initscr" >&5
17443 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
17444 if test "${ac_cv_func_initscr+set}" = set; then
17445   echo $ECHO_N "(cached) $ECHO_C" >&6
17446 else
17447   cat >"conftest.$ac_ext" <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450 #define initscr autoconf_temporary
17451 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17452 #undef initscr
17453
17454 #ifdef __cplusplus
17455 extern "C"
17456 #endif
17457
17458 /* We use char because int might match the return type of a gcc2
17459    builtin and then its argument prototype would still apply.  */
17460 char initscr (void);
17461
17462 int
17463 main (void)
17464 {
17465
17466 /* The GNU C library defines stubs for functions which it implements
17467     to always fail with ENOSYS.  Some functions are actually named
17468     something starting with __ and the normal name is an alias.  */
17469 #if defined (__stub_initscr) || defined (__stub___initscr)
17470 #error found stub for initscr
17471 #endif
17472
17473         return initscr ();
17474   ;
17475   return 0;
17476 }
17477 _ACEOF
17478 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17479 if { (eval echo "$as_me:17479: \"$ac_link\"") >&5
17480   (eval $ac_link) 2>&5
17481   ac_status=$?
17482   echo "$as_me:17482: \$? = $ac_status" >&5
17483   (exit "$ac_status"); } &&
17484          { ac_try='test -s "conftest$ac_exeext"'
17485   { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486   (eval $ac_try) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit "$ac_status"); }; }; then
17490   ac_cv_func_initscr=yes
17491 else
17492   echo "$as_me: failed program was:" >&5
17493 cat "conftest.$ac_ext" >&5
17494 ac_cv_func_initscr=no
17495 fi
17496 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17497 fi
17498 echo "$as_me:17498: result: $ac_cv_func_initscr" >&5
17499 echo "${ECHO_T}$ac_cv_func_initscr" >&6
17500 if test "$ac_cv_func_initscr" = yes; then
17501   eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17502 else
17503
17504                 cf_save_LIBS="$LIBS"
17505                 echo "$as_me:17505: checking for initscr in -l$cf_nculib_root" >&5
17506 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
17507                 LIBS="-l$cf_nculib_root $LIBS"
17508                 cat >"conftest.$ac_ext" <<_ACEOF
17509 #line 17509 "configure"
17510 #include "confdefs.h"
17511 #include <${cf_cv_ncurses_header:-curses.h}>
17512 int
17513 main (void)
17514 {
17515 initscr()
17516   ;
17517   return 0;
17518 }
17519 _ACEOF
17520 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17521 if { (eval echo "$as_me:17521: \"$ac_link\"") >&5
17522   (eval $ac_link) 2>&5
17523   ac_status=$?
17524   echo "$as_me:17524: \$? = $ac_status" >&5
17525   (exit "$ac_status"); } &&
17526          { ac_try='test -s "conftest$ac_exeext"'
17527   { (eval echo "$as_me:17527: \"$ac_try\"") >&5
17528   (eval $ac_try) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit "$ac_status"); }; }; then
17532   echo "$as_me:17532: result: yes" >&5
17533 echo "${ECHO_T}yes" >&6
17534                          eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17535
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 cat "conftest.$ac_ext" >&5
17539 echo "$as_me:17539: result: no" >&5
17540 echo "${ECHO_T}no" >&6
17541
17542 cf_search=
17543 cf_library_path_list=""
17544 if test -n "${LDFLAGS}${LIBS}" ; then
17545         for cf_library_path in $LDFLAGS $LIBS
17546         do
17547                 case "$cf_library_path" in
17548                 (-L*)
17549                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17550
17551 test "x$cf_library_path" != "xNONE" && \
17552 test -d "$cf_library_path" && \
17553  {
17554         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
17555         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
17556         test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
17557         test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
17558         test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
17559         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"
17560 }
17561
17562                         cf_library_path_list="$cf_library_path_list $cf_search"
17563                         ;;
17564                 esac
17565         done
17566 fi
17567
17568 cf_search=
17569
17570 test "x$prefix" != "xNONE" && \
17571 test -d "$prefix" && \
17572  {
17573         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
17574         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
17575         test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
17576         test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
17577         test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
17578         test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
17579 }
17580
17581 for cf_subdir_prefix in \
17582         /usr \
17583         /usr/local \
17584         /usr/pkg \
17585         /opt \
17586         /opt/local \
17587         $HOME
17588 do
17589
17590 test "x$cf_subdir_prefix" != "x$prefix" && \
17591 test -d "$cf_subdir_prefix" && \
17592 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17593         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
17594         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
17595         test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
17596         test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
17597         test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
17598         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"
17599 }
17600
17601 done
17602
17603 cf_search="$cf_library_path_list $cf_search"
17604
17605                         for cf_libdir in $cf_search
17606                         do
17607                                 echo "$as_me:17607: checking for -l$cf_nculib_root in $cf_libdir" >&5
17608 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
17609                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
17610                                 cat >"conftest.$ac_ext" <<_ACEOF
17611 #line 17611 "configure"
17612 #include "confdefs.h"
17613 #include <${cf_cv_ncurses_header:-curses.h}>
17614 int
17615 main (void)
17616 {
17617 initscr()
17618   ;
17619   return 0;
17620 }
17621 _ACEOF
17622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17623 if { (eval echo "$as_me:17623: \"$ac_link\"") >&5
17624   (eval $ac_link) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit "$ac_status"); } &&
17628          { ac_try='test -s "conftest$ac_exeext"'
17629   { (eval echo "$as_me:17629: \"$ac_try\"") >&5
17630   (eval $ac_try) 2>&5
17631   ac_status=$?
17632   echo "$as_me:17632: \$? = $ac_status" >&5
17633   (exit "$ac_status"); }; }; then
17634   echo "$as_me:17634: result: yes" >&5
17635 echo "${ECHO_T}yes" >&6
17636                                          eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17637                                          break
17638 else
17639   echo "$as_me: failed program was:" >&5
17640 cat "conftest.$ac_ext" >&5
17641 echo "$as_me:17641: result: no" >&5
17642 echo "${ECHO_T}no" >&6
17643                                          LIBS="$cf_save_LIBS"
17644 fi
17645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17646                         done
17647
17648 fi
17649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17650
17651 fi
17652
17653 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
17654
17655 if test "$cf_found_library" = no ; then
17656         { { echo "$as_me:17656: error: Cannot link $cf_nculib_root library" >&5
17657 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
17658    { (exit 1); exit 1; }; }
17659 fi
17660
17661 fi
17662
17663 if test -n "$cf_ncurses_LIBS" ; then
17664         echo "$as_me:17664: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
17665 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
17666         cf_ncurses_SAVE="$LIBS"
17667         for p in $cf_ncurses_LIBS ; do
17668                 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
17669                 if test "$q" != "$LIBS" ; then
17670                         LIBS="$q"
17671                 fi
17672         done
17673         cat >"conftest.$ac_ext" <<_ACEOF
17674 #line 17674 "configure"
17675 #include "confdefs.h"
17676 #include <${cf_cv_ncurses_header:-curses.h}>
17677 int
17678 main (void)
17679 {
17680 initscr(); mousemask(0,0); tigetstr((char *)0);
17681   ;
17682   return 0;
17683 }
17684 _ACEOF
17685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17686 if { (eval echo "$as_me:17686: \"$ac_link\"") >&5
17687   (eval $ac_link) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit "$ac_status"); } &&
17691          { ac_try='test -s "conftest$ac_exeext"'
17692   { (eval echo "$as_me:17692: \"$ac_try\"") >&5
17693   (eval $ac_try) 2>&5
17694   ac_status=$?
17695   echo "$as_me:17695: \$? = $ac_status" >&5
17696   (exit "$ac_status"); }; }; then
17697   echo "$as_me:17697: result: yes" >&5
17698 echo "${ECHO_T}yes" >&6
17699 else
17700   echo "$as_me: failed program was:" >&5
17701 cat "conftest.$ac_ext" >&5
17702 echo "$as_me:17702: result: no" >&5
17703 echo "${ECHO_T}no" >&6
17704                  LIBS="$cf_ncurses_SAVE"
17705 fi
17706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17707 fi
17708
17709 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17710
17711 cat >>confdefs.h <<EOF
17712 #define $cf_nculib_ROOT 1
17713 EOF
17714
17715         fi
17716 else
17717         NCURSES_CONFIG=none
17718 fi
17719
17720         ;;
17721 (ncurses*)
17722
17723 cf_ncuconfig_root=$cf_cv_screen
17724 cf_have_ncuconfig=no
17725
17726 if test "x${PKG_CONFIG:=none}" != xnone; then
17727         echo "$as_me:17727: checking pkg-config for $cf_ncuconfig_root" >&5
17728 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
17729         if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
17730                 echo "$as_me:17730: result: yes" >&5
17731 echo "${ECHO_T}yes" >&6
17732
17733                 echo "$as_me:17733: checking if the $cf_ncuconfig_root package files work" >&5
17734 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
17735                 cf_have_ncuconfig=unknown
17736
17737                 cf_save_CFLAGS="$CFLAGS"
17738                 cf_save_CPPFLAGS="$CPPFLAGS"
17739                 cf_save_LIBS="$LIBS"
17740
17741                 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
17742                 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
17743
17744                 # while -W for passing linker flags is prevalent, it is not "standard".
17745                 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
17746                 # incompatible _and_ non-standard -W option which gives an error.  Work
17747                 # around that pitfall.
17748                 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
17749                 (x*c[89]9@@*-W*)
17750
17751 cf_fix_cppflags=no
17752 cf_new_cflags=
17753 cf_new_cppflags=
17754 cf_new_extra_cppflags=
17755
17756 for cf_add_cflags in $cf_pkg_cflags
17757 do
17758 case "$cf_fix_cppflags" in
17759 (no)
17760         case "$cf_add_cflags" in
17761         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17762                 case "$cf_add_cflags" in
17763                 (-D*)
17764                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17765
17766                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17767                                 && test -z "${cf_tst_cflags}" \
17768                                 && cf_fix_cppflags=yes
17769
17770                         if test "$cf_fix_cppflags" = yes ; then
17771
17772         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17773         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17774
17775                                 continue
17776                         elif test "${cf_tst_cflags}" = "\"'" ; then
17777
17778         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17779         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17780
17781                                 continue
17782                         fi
17783                         ;;
17784                 esac
17785                 case "$CPPFLAGS" in
17786                 (*$cf_add_cflags)
17787                         ;;
17788                 (*)
17789                         case "$cf_add_cflags" in
17790                         (-D*)
17791                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17792
17793 CPPFLAGS=`echo "$CPPFLAGS" | \
17794         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17795                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17796
17797                                 ;;
17798                         esac
17799
17800         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17801         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17802
17803                         ;;
17804                 esac
17805                 ;;
17806         (*)
17807
17808         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17809         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17810
17811                 ;;
17812         esac
17813         ;;
17814 (yes)
17815
17816         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17817         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17818
17819         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17820
17821         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17822                 && test -z "${cf_tst_cflags}" \
17823                 && cf_fix_cppflags=no
17824         ;;
17825 esac
17826 done
17827
17828 if test -n "$cf_new_cflags" ; then
17829
17830         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17831         CFLAGS="${CFLAGS}$cf_new_cflags"
17832
17833 fi
17834
17835 if test -n "$cf_new_cppflags" ; then
17836
17837         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17838         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17839
17840 fi
17841
17842 if test -n "$cf_new_extra_cppflags" ; then
17843
17844         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17845         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17846
17847 fi
17848
17849 cf_add_libs="$LIBS"
17850 # reverse order
17851 cf_add_0lib=
17852 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17853 # filter duplicates
17854 for cf_add_1lib in $cf_add_0lib; do
17855         for cf_add_2lib in $cf_add_libs; do
17856                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17857                         cf_add_1lib=
17858                         break
17859                 fi
17860         done
17861         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17862 done
17863 LIBS="$cf_add_libs"
17864
17865                         cat >"conftest.$ac_ext" <<_ACEOF
17866 #line 17866 "configure"
17867 #include "confdefs.h"
17868 #include <${cf_cv_ncurses_header:-curses.h}>
17869 int
17870 main (void)
17871 {
17872 initscr(); mousemask(0,0); tigetstr((char *)0);
17873   ;
17874   return 0;
17875 }
17876 _ACEOF
17877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17878 if { (eval echo "$as_me:17878: \"$ac_link\"") >&5
17879   (eval $ac_link) 2>&5
17880   ac_status=$?
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit "$ac_status"); } &&
17883          { ac_try='test -s "conftest$ac_exeext"'
17884   { (eval echo "$as_me:17884: \"$ac_try\"") >&5
17885   (eval $ac_try) 2>&5
17886   ac_status=$?
17887   echo "$as_me:17887: \$? = $ac_status" >&5
17888   (exit "$ac_status"); }; }; then
17889   if test "$cross_compiling" = yes; then
17890   cf_test_ncuconfig=maybe
17891 else
17892   cat >"conftest.$ac_ext" <<_ACEOF
17893 #line 17893 "configure"
17894 #include "confdefs.h"
17895 #include <${cf_cv_ncurses_header:-curses.h}>
17896                                         int main(void)
17897                                         { char *xx = curses_version(); return (xx == 0); }
17898 _ACEOF
17899 rm -f "conftest$ac_exeext"
17900 if { (eval echo "$as_me:17900: \"$ac_link\"") >&5
17901   (eval $ac_link) 2>&5
17902   ac_status=$?
17903   echo "$as_me:17903: \$? = $ac_status" >&5
17904   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17905   { (eval echo "$as_me:17905: \"$ac_try\"") >&5
17906   (eval $ac_try) 2>&5
17907   ac_status=$?
17908   echo "$as_me:17908: \$? = $ac_status" >&5
17909   (exit "$ac_status"); }; }; then
17910   cf_test_ncuconfig=yes
17911 else
17912   echo "$as_me: program exited with status $ac_status" >&5
17913 echo "$as_me: failed program was:" >&5
17914 cat "conftest.$ac_ext" >&5
17915 cf_test_ncuconfig=no
17916 fi
17917 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17918 fi
17919 else
17920   echo "$as_me: failed program was:" >&5
17921 cat "conftest.$ac_ext" >&5
17922 cf_test_ncuconfig=no
17923 fi
17924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17925
17926                         CFLAGS="$cf_save_CFLAGS"
17927                         CPPFLAGS="$cf_save_CPPFLAGS"
17928                         LIBS="$cf_save_LIBS"
17929
17930                         if test "x$cf_test_ncuconfig" != xyes; then
17931                                 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^      ]*//g'`
17932                                 cf_pkg_cflags="$cf_temp"
17933                                 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^        ]*//g'`
17934                                 cf_pkg_libs="$cf_temp"
17935                         fi
17936                         ;;
17937                 esac
17938
17939 cf_fix_cppflags=no
17940 cf_new_cflags=
17941 cf_new_cppflags=
17942 cf_new_extra_cppflags=
17943
17944 for cf_add_cflags in $cf_pkg_cflags
17945 do
17946 case "$cf_fix_cppflags" in
17947 (no)
17948         case "$cf_add_cflags" in
17949         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17950                 case "$cf_add_cflags" in
17951                 (-D*)
17952                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17953
17954                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17955                                 && test -z "${cf_tst_cflags}" \
17956                                 && cf_fix_cppflags=yes
17957
17958                         if test "$cf_fix_cppflags" = yes ; then
17959
17960         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17961         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17962
17963                                 continue
17964                         elif test "${cf_tst_cflags}" = "\"'" ; then
17965
17966         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17967         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17968
17969                                 continue
17970                         fi
17971                         ;;
17972                 esac
17973                 case "$CPPFLAGS" in
17974                 (*$cf_add_cflags)
17975                         ;;
17976                 (*)
17977                         case "$cf_add_cflags" in
17978                         (-D*)
17979                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17980
17981 CPPFLAGS=`echo "$CPPFLAGS" | \
17982         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17983                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17984
17985                                 ;;
17986                         esac
17987
17988         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17989         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17990
17991                         ;;
17992                 esac
17993                 ;;
17994         (*)
17995
17996         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17997         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17998
17999                 ;;
18000         esac
18001         ;;
18002 (yes)
18003
18004         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18005         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18006
18007         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18008
18009         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18010                 && test -z "${cf_tst_cflags}" \
18011                 && cf_fix_cppflags=no
18012         ;;
18013 esac
18014 done
18015
18016 if test -n "$cf_new_cflags" ; then
18017
18018         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18019         CFLAGS="${CFLAGS}$cf_new_cflags"
18020
18021 fi
18022
18023 if test -n "$cf_new_cppflags" ; then
18024
18025         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18026         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18027
18028 fi
18029
18030 if test -n "$cf_new_extra_cppflags" ; then
18031
18032         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18033         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18034
18035 fi
18036
18037 cf_add_libs="$LIBS"
18038 # reverse order
18039 cf_add_0lib=
18040 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18041 # filter duplicates
18042 for cf_add_1lib in $cf_add_0lib; do
18043         for cf_add_2lib in $cf_add_libs; do
18044                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18045                         cf_add_1lib=
18046                         break
18047                 fi
18048         done
18049         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18050 done
18051 LIBS="$cf_add_libs"
18052
18053                 cat >"conftest.$ac_ext" <<_ACEOF
18054 #line 18054 "configure"
18055 #include "confdefs.h"
18056 #include <${cf_cv_ncurses_header:-curses.h}>
18057 int
18058 main (void)
18059 {
18060 initscr(); mousemask(0,0); tigetstr((char *)0);
18061   ;
18062   return 0;
18063 }
18064 _ACEOF
18065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18066 if { (eval echo "$as_me:18066: \"$ac_link\"") >&5
18067   (eval $ac_link) 2>&5
18068   ac_status=$?
18069   echo "$as_me:18069: \$? = $ac_status" >&5
18070   (exit "$ac_status"); } &&
18071          { ac_try='test -s "conftest$ac_exeext"'
18072   { (eval echo "$as_me:18072: \"$ac_try\"") >&5
18073   (eval $ac_try) 2>&5
18074   ac_status=$?
18075   echo "$as_me:18075: \$? = $ac_status" >&5
18076   (exit "$ac_status"); }; }; then
18077   if test "$cross_compiling" = yes; then
18078   cf_have_ncuconfig=maybe
18079 else
18080   cat >"conftest.$ac_ext" <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083 #include <${cf_cv_ncurses_header:-curses.h}>
18084                                 int main(void)
18085                                 { char *xx = curses_version(); return (xx == 0); }
18086 _ACEOF
18087 rm -f "conftest$ac_exeext"
18088 if { (eval echo "$as_me:18088: \"$ac_link\"") >&5
18089   (eval $ac_link) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18093   { (eval echo "$as_me:18093: \"$ac_try\"") >&5
18094   (eval $ac_try) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit "$ac_status"); }; }; then
18098   cf_have_ncuconfig=yes
18099 else
18100   echo "$as_me: program exited with status $ac_status" >&5
18101 echo "$as_me: failed program was:" >&5
18102 cat "conftest.$ac_ext" >&5
18103 cf_have_ncuconfig=no
18104 fi
18105 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18106 fi
18107 else
18108   echo "$as_me: failed program was:" >&5
18109 cat "conftest.$ac_ext" >&5
18110 cf_have_ncuconfig=no
18111 fi
18112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18113                 echo "$as_me:18113: result: $cf_have_ncuconfig" >&5
18114 echo "${ECHO_T}$cf_have_ncuconfig" >&6
18115                 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
18116                 if test "$cf_have_ncuconfig" != "yes"
18117                 then
18118                         CPPFLAGS="$cf_save_CPPFLAGS"
18119                         LIBS="$cf_save_LIBS"
18120                         NCURSES_CONFIG_PKG=none
18121                 else
18122
18123 cat >>confdefs.h <<\EOF
18124 #define NCURSES 1
18125 EOF
18126
18127                         NCURSES_CONFIG_PKG=$cf_ncuconfig_root
18128
18129 echo "$as_me:18129: checking for terminfo header" >&5
18130 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
18131 if test "${cf_cv_term_header+set}" = set; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134
18135 case "${cf_cv_ncurses_header}" in
18136 (*/ncurses.h|*/ncursesw.h)
18137         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
18138         ;;
18139 (*)
18140         cf_term_header=term.h
18141         ;;
18142 esac
18143
18144 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
18145 do
18146 cat >"conftest.$ac_ext" <<_ACEOF
18147 #line 18147 "configure"
18148 #include "confdefs.h"
18149 #include <stdio.h>
18150 #include <${cf_cv_ncurses_header:-curses.h}>
18151 #include <$cf_test>
18152
18153 int
18154 main (void)
18155 {
18156 int x = auto_left_margin; (void)x
18157   ;
18158   return 0;
18159 }
18160 _ACEOF
18161 rm -f "conftest.$ac_objext"
18162 if { (eval echo "$as_me:18162: \"$ac_compile\"") >&5
18163   (eval $ac_compile) 2>&5
18164   ac_status=$?
18165   echo "$as_me:18165: \$? = $ac_status" >&5
18166   (exit "$ac_status"); } &&
18167          { ac_try='test -s "conftest.$ac_objext"'
18168   { (eval echo "$as_me:18168: \"$ac_try\"") >&5
18169   (eval $ac_try) 2>&5
18170   ac_status=$?
18171   echo "$as_me:18171: \$? = $ac_status" >&5
18172   (exit "$ac_status"); }; }; then
18173
18174         cf_cv_term_header="$cf_test"
18175 else
18176   echo "$as_me: failed program was:" >&5
18177 cat "conftest.$ac_ext" >&5
18178
18179         cf_cv_term_header=unknown
18180
18181 fi
18182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18183         test "$cf_cv_term_header" != unknown && break
18184 done
18185
18186 fi
18187 echo "$as_me:18187: result: $cf_cv_term_header" >&5
18188 echo "${ECHO_T}$cf_cv_term_header" >&6
18189
18190 # Set definitions to allow ifdef'ing to accommodate subdirectories
18191
18192 case "$cf_cv_term_header" in
18193 (*term.h)
18194
18195 cat >>confdefs.h <<\EOF
18196 #define HAVE_TERM_H 1
18197 EOF
18198
18199         ;;
18200 esac
18201
18202 case "$cf_cv_term_header" in
18203 (ncurses/term.h)
18204
18205 cat >>confdefs.h <<\EOF
18206 #define HAVE_NCURSES_TERM_H 1
18207 EOF
18208
18209         ;;
18210 (ncursesw/term.h)
18211
18212 cat >>confdefs.h <<\EOF
18213 #define HAVE_NCURSESW_TERM_H 1
18214 EOF
18215
18216         ;;
18217 esac
18218
18219                 fi
18220
18221         else
18222                 echo "$as_me:18222: result: no" >&5
18223 echo "${ECHO_T}no" >&6
18224                 NCURSES_CONFIG_PKG=none
18225         fi
18226 else
18227         NCURSES_CONFIG_PKG=none
18228 fi
18229
18230 if test "x$cf_have_ncuconfig" = "xno"; then
18231         cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
18232
18233 if test -n "$ac_tool_prefix"; then
18234   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18235   do
18236     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18237 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18238 echo "$as_me:18238: checking for $ac_word" >&5
18239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18240 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
18241   echo $ECHO_N "(cached) $ECHO_C" >&6
18242 else
18243   if test -n "$NCURSES_CONFIG"; then
18244   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
18245 else
18246   ac_save_IFS=$IFS; IFS=$ac_path_separator
18247 ac_dummy="$PATH"
18248 for ac_dir in $ac_dummy; do
18249   IFS=$ac_save_IFS
18250   test -z "$ac_dir" && ac_dir=.
18251   $as_executable_p "$ac_dir/$ac_word" || continue
18252 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
18253 echo "$as_me:18253: found $ac_dir/$ac_word" >&5
18254 break
18255 done
18256
18257 fi
18258 fi
18259 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
18260 if test -n "$NCURSES_CONFIG"; then
18261   echo "$as_me:18261: result: $NCURSES_CONFIG" >&5
18262 echo "${ECHO_T}$NCURSES_CONFIG" >&6
18263 else
18264   echo "$as_me:18264: result: no" >&5
18265 echo "${ECHO_T}no" >&6
18266 fi
18267
18268     test -n "$NCURSES_CONFIG" && break
18269   done
18270 fi
18271 if test -z "$NCURSES_CONFIG"; then
18272   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
18273   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18274 do
18275   # Extract the first word of "$ac_prog", so it can be a program name with args.
18276 set dummy $ac_prog; ac_word=$2
18277 echo "$as_me:18277: checking for $ac_word" >&5
18278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18279 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
18280   echo $ECHO_N "(cached) $ECHO_C" >&6
18281 else
18282   if test -n "$ac_ct_NCURSES_CONFIG"; then
18283   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
18284 else
18285   ac_save_IFS=$IFS; IFS=$ac_path_separator
18286 ac_dummy="$PATH"
18287 for ac_dir in $ac_dummy; do
18288   IFS=$ac_save_IFS
18289   test -z "$ac_dir" && ac_dir=.
18290   $as_executable_p "$ac_dir/$ac_word" || continue
18291 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
18292 echo "$as_me:18292: found $ac_dir/$ac_word" >&5
18293 break
18294 done
18295
18296 fi
18297 fi
18298 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
18299 if test -n "$ac_ct_NCURSES_CONFIG"; then
18300   echo "$as_me:18300: result: $ac_ct_NCURSES_CONFIG" >&5
18301 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
18302 else
18303   echo "$as_me:18303: result: no" >&5
18304 echo "${ECHO_T}no" >&6
18305 fi
18306
18307   test -n "$ac_ct_NCURSES_CONFIG" && break
18308 done
18309 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
18310
18311   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
18312 fi
18313
18314         if test "$NCURSES_CONFIG" != none ; then
18315
18316 cf_fix_cppflags=no
18317 cf_new_cflags=
18318 cf_new_cppflags=
18319 cf_new_extra_cppflags=
18320
18321 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
18322 do
18323 case "$cf_fix_cppflags" in
18324 (no)
18325         case "$cf_add_cflags" in
18326         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18327                 case "$cf_add_cflags" in
18328                 (-D*)
18329                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18330
18331                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18332                                 && test -z "${cf_tst_cflags}" \
18333                                 && cf_fix_cppflags=yes
18334
18335                         if test "$cf_fix_cppflags" = yes ; then
18336
18337         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18338         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18339
18340                                 continue
18341                         elif test "${cf_tst_cflags}" = "\"'" ; then
18342
18343         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18344         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18345
18346                                 continue
18347                         fi
18348                         ;;
18349                 esac
18350                 case "$CPPFLAGS" in
18351                 (*$cf_add_cflags)
18352                         ;;
18353                 (*)
18354                         case "$cf_add_cflags" in
18355                         (-D*)
18356                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18357
18358 CPPFLAGS=`echo "$CPPFLAGS" | \
18359         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18360                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18361
18362                                 ;;
18363                         esac
18364
18365         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18366         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18367
18368                         ;;
18369                 esac
18370                 ;;
18371         (*)
18372
18373         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18374         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18375
18376                 ;;
18377         esac
18378         ;;
18379 (yes)
18380
18381         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18382         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18383
18384         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18385
18386         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18387                 && test -z "${cf_tst_cflags}" \
18388                 && cf_fix_cppflags=no
18389         ;;
18390 esac
18391 done
18392
18393 if test -n "$cf_new_cflags" ; then
18394
18395         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18396         CFLAGS="${CFLAGS}$cf_new_cflags"
18397
18398 fi
18399
18400 if test -n "$cf_new_cppflags" ; then
18401
18402         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18403         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18404
18405 fi
18406
18407 if test -n "$cf_new_extra_cppflags" ; then
18408
18409         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18410         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18411
18412 fi
18413
18414 cf_add_libs="$LIBS"
18415 # reverse order
18416 cf_add_0lib=
18417 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18418 # filter duplicates
18419 for cf_add_1lib in $cf_add_0lib; do
18420         for cf_add_2lib in $cf_add_libs; do
18421                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18422                         cf_add_1lib=
18423                         break
18424                 fi
18425         done
18426         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18427 done
18428 LIBS="$cf_add_libs"
18429
18430                 # even with config script, some packages use no-override for curses.h
18431
18432 echo "$as_me:18432: checking if we have identified curses headers" >&5
18433 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
18434 if test "${cf_cv_ncurses_header+set}" = set; then
18435   echo $ECHO_N "(cached) $ECHO_C" >&6
18436 else
18437
18438 cf_cv_ncurses_header=none
18439 for cf_header in \
18440         ncurses.h $cf_cv_screen/ncurses.h \
18441         curses.h $cf_cv_screen/curses.h
18442 do
18443 cat >"conftest.$ac_ext" <<_ACEOF
18444 #line 18444 "configure"
18445 #include "confdefs.h"
18446 #include <${cf_header}>
18447 int
18448 main (void)
18449 {
18450 initscr(); tgoto("?", 0,0)
18451   ;
18452   return 0;
18453 }
18454 _ACEOF
18455 rm -f "conftest.$ac_objext"
18456 if { (eval echo "$as_me:18456: \"$ac_compile\"") >&5
18457   (eval $ac_compile) 2>&5
18458   ac_status=$?
18459   echo "$as_me:18459: \$? = $ac_status" >&5
18460   (exit "$ac_status"); } &&
18461          { ac_try='test -s "conftest.$ac_objext"'
18462   { (eval echo "$as_me:18462: \"$ac_try\"") >&5
18463   (eval $ac_try) 2>&5
18464   ac_status=$?
18465   echo "$as_me:18465: \$? = $ac_status" >&5
18466   (exit "$ac_status"); }; }; then
18467   cf_cv_ncurses_header=$cf_header; break
18468 else
18469   echo "$as_me: failed program was:" >&5
18470 cat "conftest.$ac_ext" >&5
18471 fi
18472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18473 done
18474
18475 fi
18476 echo "$as_me:18476: result: $cf_cv_ncurses_header" >&5
18477 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
18478
18479 if test "$cf_cv_ncurses_header" = none ; then
18480         { { echo "$as_me:18480: error: No curses header-files found" >&5
18481 echo "$as_me: error: No curses header-files found" >&2;}
18482    { (exit 1); exit 1; }; }
18483 fi
18484
18485 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
18486
18487 for ac_header in $cf_cv_ncurses_header
18488 do
18489 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18490 echo "$as_me:18490: checking for $ac_header" >&5
18491 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18492 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18493   echo $ECHO_N "(cached) $ECHO_C" >&6
18494 else
18495   cat >"conftest.$ac_ext" <<_ACEOF
18496 #line 18496 "configure"
18497 #include "confdefs.h"
18498 #include <$ac_header>
18499 _ACEOF
18500 if { (eval echo "$as_me:18500: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18501   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18502   ac_status=$?
18503   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18504   rm -f conftest.er1
18505   cat conftest.err >&5
18506   echo "$as_me:18506: \$? = $ac_status" >&5
18507   (exit "$ac_status"); } >/dev/null; then
18508   if test -s conftest.err; then
18509     ac_cpp_err=$ac_c_preproc_warn_flag
18510   else
18511     ac_cpp_err=
18512   fi
18513 else
18514   ac_cpp_err=yes
18515 fi
18516 if test -z "$ac_cpp_err"; then
18517   eval "$as_ac_Header=yes"
18518 else
18519   echo "$as_me: failed program was:" >&5
18520   cat "conftest.$ac_ext" >&5
18521   eval "$as_ac_Header=no"
18522 fi
18523 rm -f conftest.err "conftest.$ac_ext"
18524 fi
18525 echo "$as_me:18525: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18526 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18527 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18528   cat >>confdefs.h <<EOF
18529 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18530 EOF
18531
18532 fi
18533 done
18534
18535 cat >>confdefs.h <<\EOF
18536 #define NCURSES 1
18537 EOF
18538
18539 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18540
18541                 cat >>confdefs.h <<EOF
18542 #define $cf_nculib_ROOT 1
18543 EOF
18544
18545                                 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
18546
18547         else
18548
18549 cf_ncuhdr_root=$cf_cv_screen
18550
18551 test -n "$cf_cv_curses_dir" && \
18552 test "$cf_cv_curses_dir" != "no" && { \
18553
18554 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
18555   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
18556   do
18557         while test "$cf_add_incdir" != /usr/include
18558         do
18559           if test -d "$cf_add_incdir"
18560           then
18561                 cf_have_incdir=no
18562                 if test -n "$CFLAGS$CPPFLAGS" ; then
18563                   # a loop is needed to ensure we can add subdirs of existing dirs
18564                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18565                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18566                           cf_have_incdir=yes; break
18567                         fi
18568                   done
18569                 fi
18570
18571                 if test "$cf_have_incdir" = no ; then
18572                   if test "$cf_add_incdir" = /usr/local/include ; then
18573                         if test "$GCC" = yes
18574                         then
18575                           cf_save_CPPFLAGS=$CPPFLAGS
18576
18577         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18578         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18579
18580                           cat >"conftest.$ac_ext" <<_ACEOF
18581 #line 18581 "configure"
18582 #include "confdefs.h"
18583 #include <stdio.h>
18584 int
18585 main (void)
18586 {
18587 printf("Hello")
18588   ;
18589   return 0;
18590 }
18591 _ACEOF
18592 rm -f "conftest.$ac_objext"
18593 if { (eval echo "$as_me:18593: \"$ac_compile\"") >&5
18594   (eval $ac_compile) 2>&5
18595   ac_status=$?
18596   echo "$as_me:18596: \$? = $ac_status" >&5
18597   (exit "$ac_status"); } &&
18598          { ac_try='test -s "conftest.$ac_objext"'
18599   { (eval echo "$as_me:18599: \"$ac_try\"") >&5
18600   (eval $ac_try) 2>&5
18601   ac_status=$?
18602   echo "$as_me:18602: \$? = $ac_status" >&5
18603   (exit "$ac_status"); }; }; then
18604   :
18605 else
18606   echo "$as_me: failed program was:" >&5
18607 cat "conftest.$ac_ext" >&5
18608 cf_have_incdir=yes
18609 fi
18610 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18611                           CPPFLAGS=$cf_save_CPPFLAGS
18612                         fi
18613                   fi
18614                 fi
18615
18616                 if test "$cf_have_incdir" = no ; then
18617                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18618
18619 echo "${as_me:-configure}:18619: testing adding $cf_add_incdir to include-path ..." 1>&5
18620
18621                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18622
18623                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18624                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18625                   cf_add_incdir="$cf_top_incdir"
18626                 else
18627                   break
18628                 fi
18629           else
18630                 break
18631           fi
18632         done
18633   done
18634 fi
18635
18636 }
18637
18638 echo "$as_me:18638: checking for $cf_ncuhdr_root header in include-path" >&5
18639 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
18640 if test "${cf_cv_ncurses_h+set}" = set; then
18641   echo $ECHO_N "(cached) $ECHO_C" >&6
18642 else
18643
18644         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
18645         { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
18646         for cf_header in $cf_header_list
18647         do
18648
18649         cat >"conftest.$ac_ext" <<_ACEOF
18650 #line 18650 "configure"
18651 #include "confdefs.h"
18652
18653 #include <$cf_header>
18654 int
18655 main (void)
18656 {
18657
18658 #ifdef NCURSES_VERSION
18659
18660 printf("%s\\n", NCURSES_VERSION);
18661 #else
18662 #ifdef __NCURSES_H
18663 printf("old\\n");
18664 #else
18665         make an error
18666 #endif
18667 #endif
18668
18669   ;
18670   return 0;
18671 }
18672 _ACEOF
18673 rm -f "conftest.$ac_objext"
18674 if { (eval echo "$as_me:18674: \"$ac_compile\"") >&5
18675   (eval $ac_compile) 2>&5
18676   ac_status=$?
18677   echo "$as_me:18677: \$? = $ac_status" >&5
18678   (exit "$ac_status"); } &&
18679          { ac_try='test -s "conftest.$ac_objext"'
18680   { (eval echo "$as_me:18680: \"$ac_try\"") >&5
18681   (eval $ac_try) 2>&5
18682   ac_status=$?
18683   echo "$as_me:18683: \$? = $ac_status" >&5
18684   (exit "$ac_status"); }; }; then
18685   cf_cv_ncurses_h=$cf_header
18686
18687 else
18688   echo "$as_me: failed program was:" >&5
18689 cat "conftest.$ac_ext" >&5
18690 cf_cv_ncurses_h=no
18691 fi
18692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18693
18694                 test "$cf_cv_ncurses_h" != no && break
18695         done
18696
18697 fi
18698 echo "$as_me:18698: result: $cf_cv_ncurses_h" >&5
18699 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
18700
18701 if test "$cf_cv_ncurses_h" != no ; then
18702         cf_cv_ncurses_header=$cf_cv_ncurses_h
18703 else
18704
18705 echo "$as_me:18705: checking for $cf_ncuhdr_root include-path" >&5
18706 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
18707 if test "${cf_cv_ncurses_h2+set}" = set; then
18708   echo $ECHO_N "(cached) $ECHO_C" >&6
18709 else
18710
18711         test -n "$verbose" && echo
18712
18713 cf_search=
18714
18715 # collect the current set of include-directories from compiler flags
18716 cf_header_path_list=""
18717 if test -n "${CFLAGS}${CPPFLAGS}" ; then
18718         for cf_header_path in $CPPFLAGS $CFLAGS
18719         do
18720                 case "$cf_header_path" in
18721                 (-I*)
18722                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
18723
18724 test "x$cf_header_path" != "xNONE" && \
18725 test -d "$cf_header_path" && \
18726  {
18727         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
18728         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
18729         test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
18730         test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
18731         test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
18732         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"
18733 }
18734
18735                         cf_header_path_list="$cf_header_path_list $cf_search"
18736                         ;;
18737                 esac
18738         done
18739 fi
18740
18741 # add the variations for the package we are looking for
18742
18743 cf_search=
18744
18745 test "x$prefix" != "xNONE" && \
18746 test -d "$prefix" && \
18747  {
18748         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18749         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
18750         test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
18751         test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
18752         test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
18753         test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
18754 }
18755
18756 for cf_subdir_prefix in \
18757         /usr \
18758         /usr/local \
18759         /usr/pkg \
18760         /opt \
18761         /opt/local \
18762         $HOME
18763 do
18764
18765 test "x$cf_subdir_prefix" != "x$prefix" && \
18766 test -d "$cf_subdir_prefix" && \
18767 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18768         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18769         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
18770         test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
18771         test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
18772         test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
18773         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"
18774 }
18775
18776 done
18777
18778 test "$includedir" != NONE && \
18779 test "$includedir" != "/usr/include" && \
18780 test -d "$includedir" && {
18781         test -d "$includedir" &&    cf_search="$cf_search $includedir"
18782         test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
18783 }
18784
18785 test "$oldincludedir" != NONE && \
18786 test "$oldincludedir" != "/usr/include" && \
18787 test -d "$oldincludedir" && {
18788         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
18789         test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
18790 }
18791
18792 cf_search="$cf_search $cf_header_path_list"
18793
18794         test -n "$verbose" && echo "search path $cf_search"
18795         cf_save2_CPPFLAGS="$CPPFLAGS"
18796         for cf_incdir in $cf_search
18797         do
18798
18799 if test -n "$cf_incdir" ; then
18800   for cf_add_incdir in $cf_incdir
18801   do
18802         while test "$cf_add_incdir" != /usr/include
18803         do
18804           if test -d "$cf_add_incdir"
18805           then
18806                 cf_have_incdir=no
18807                 if test -n "$CFLAGS$CPPFLAGS" ; then
18808                   # a loop is needed to ensure we can add subdirs of existing dirs
18809                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18810                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18811                           cf_have_incdir=yes; break
18812                         fi
18813                   done
18814                 fi
18815
18816                 if test "$cf_have_incdir" = no ; then
18817                   if test "$cf_add_incdir" = /usr/local/include ; then
18818                         if test "$GCC" = yes
18819                         then
18820                           cf_save_CPPFLAGS=$CPPFLAGS
18821
18822         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18823         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18824
18825                           cat >"conftest.$ac_ext" <<_ACEOF
18826 #line 18826 "configure"
18827 #include "confdefs.h"
18828 #include <stdio.h>
18829 int
18830 main (void)
18831 {
18832 printf("Hello")
18833   ;
18834   return 0;
18835 }
18836 _ACEOF
18837 rm -f "conftest.$ac_objext"
18838 if { (eval echo "$as_me:18838: \"$ac_compile\"") >&5
18839   (eval $ac_compile) 2>&5
18840   ac_status=$?
18841   echo "$as_me:18841: \$? = $ac_status" >&5
18842   (exit "$ac_status"); } &&
18843          { ac_try='test -s "conftest.$ac_objext"'
18844   { (eval echo "$as_me:18844: \"$ac_try\"") >&5
18845   (eval $ac_try) 2>&5
18846   ac_status=$?
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit "$ac_status"); }; }; then
18849   :
18850 else
18851   echo "$as_me: failed program was:" >&5
18852 cat "conftest.$ac_ext" >&5
18853 cf_have_incdir=yes
18854 fi
18855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18856                           CPPFLAGS=$cf_save_CPPFLAGS
18857                         fi
18858                   fi
18859                 fi
18860
18861                 if test "$cf_have_incdir" = no ; then
18862                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18863
18864 echo "${as_me:-configure}:18864: testing adding $cf_add_incdir to include-path ..." 1>&5
18865
18866                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18867
18868                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18869                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18870                   cf_add_incdir="$cf_top_incdir"
18871                 else
18872                   break
18873                 fi
18874           else
18875                 break
18876           fi
18877         done
18878   done
18879 fi
18880
18881                 for cf_header in \
18882                         ncurses.h \
18883                         curses.h
18884                 do
18885
18886         cat >"conftest.$ac_ext" <<_ACEOF
18887 #line 18887 "configure"
18888 #include "confdefs.h"
18889
18890 #include <$cf_header>
18891 int
18892 main (void)
18893 {
18894
18895 #ifdef NCURSES_VERSION
18896
18897 printf("%s\\n", NCURSES_VERSION);
18898 #else
18899 #ifdef __NCURSES_H
18900 printf("old\\n");
18901 #else
18902         make an error
18903 #endif
18904 #endif
18905
18906   ;
18907   return 0;
18908 }
18909 _ACEOF
18910 rm -f "conftest.$ac_objext"
18911 if { (eval echo "$as_me:18911: \"$ac_compile\"") >&5
18912   (eval $ac_compile) 2>&5
18913   ac_status=$?
18914   echo "$as_me:18914: \$? = $ac_status" >&5
18915   (exit "$ac_status"); } &&
18916          { ac_try='test -s "conftest.$ac_objext"'
18917   { (eval echo "$as_me:18917: \"$ac_try\"") >&5
18918   (eval $ac_try) 2>&5
18919   ac_status=$?
18920   echo "$as_me:18920: \$? = $ac_status" >&5
18921   (exit "$ac_status"); }; }; then
18922   cf_cv_ncurses_h2=$cf_header
18923
18924 else
18925   echo "$as_me: failed program was:" >&5
18926 cat "conftest.$ac_ext" >&5
18927 cf_cv_ncurses_h2=no
18928 fi
18929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18930
18931                         if test "$cf_cv_ncurses_h2" != no ; then
18932                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
18933                                 test -n "$verbose" && echo $ECHO_N "    ... found $ECHO_C" 1>&6
18934                                 break
18935                         fi
18936                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
18937                 done
18938                 CPPFLAGS="$cf_save2_CPPFLAGS"
18939                 test "$cf_cv_ncurses_h2" != no && break
18940         done
18941         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:18941: error: not found" >&5
18942 echo "$as_me: error: not found" >&2;}
18943    { (exit 1); exit 1; }; }
18944
18945 fi
18946 echo "$as_me:18946: result: $cf_cv_ncurses_h2" >&5
18947 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
18948
18949         cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
18950         cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
18951         if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
18952                 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
18953         fi
18954
18955 if test -n "$cf_1st_incdir" ; then
18956   for cf_add_incdir in $cf_1st_incdir
18957   do
18958         while test "$cf_add_incdir" != /usr/include
18959         do
18960           if test -d "$cf_add_incdir"
18961           then
18962                 cf_have_incdir=no
18963                 if test -n "$CFLAGS$CPPFLAGS" ; then
18964                   # a loop is needed to ensure we can add subdirs of existing dirs
18965                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18966                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18967                           cf_have_incdir=yes; break
18968                         fi
18969                   done
18970                 fi
18971
18972                 if test "$cf_have_incdir" = no ; then
18973                   if test "$cf_add_incdir" = /usr/local/include ; then
18974                         if test "$GCC" = yes
18975                         then
18976                           cf_save_CPPFLAGS=$CPPFLAGS
18977
18978         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18979         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18980
18981                           cat >"conftest.$ac_ext" <<_ACEOF
18982 #line 18982 "configure"
18983 #include "confdefs.h"
18984 #include <stdio.h>
18985 int
18986 main (void)
18987 {
18988 printf("Hello")
18989   ;
18990   return 0;
18991 }
18992 _ACEOF
18993 rm -f "conftest.$ac_objext"
18994 if { (eval echo "$as_me:18994: \"$ac_compile\"") >&5
18995   (eval $ac_compile) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit "$ac_status"); } &&
18999          { ac_try='test -s "conftest.$ac_objext"'
19000   { (eval echo "$as_me:19000: \"$ac_try\"") >&5
19001   (eval $ac_try) 2>&5
19002   ac_status=$?
19003   echo "$as_me:19003: \$? = $ac_status" >&5
19004   (exit "$ac_status"); }; }; then
19005   :
19006 else
19007   echo "$as_me: failed program was:" >&5
19008 cat "conftest.$ac_ext" >&5
19009 cf_have_incdir=yes
19010 fi
19011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19012                           CPPFLAGS=$cf_save_CPPFLAGS
19013                         fi
19014                   fi
19015                 fi
19016
19017                 if test "$cf_have_incdir" = no ; then
19018                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19019
19020 echo "${as_me:-configure}:19020: testing adding $cf_add_incdir to include-path ..." 1>&5
19021
19022                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19023
19024                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
19025                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19026                   cf_add_incdir="$cf_top_incdir"
19027                 else
19028                   break
19029                 fi
19030           else
19031                 break
19032           fi
19033         done
19034   done
19035 fi
19036
19037 fi
19038
19039 # Set definitions to allow ifdef'ing for ncurses.h
19040
19041 case "$cf_cv_ncurses_header" in
19042 (*ncurses.h)
19043
19044 cat >>confdefs.h <<\EOF
19045 #define HAVE_NCURSES_H 1
19046 EOF
19047
19048         ;;
19049 esac
19050
19051 case "$cf_cv_ncurses_header" in
19052 (ncurses/curses.h|ncurses/ncurses.h)
19053
19054 cat >>confdefs.h <<\EOF
19055 #define HAVE_NCURSES_NCURSES_H 1
19056 EOF
19057
19058         ;;
19059 (ncursesw/curses.h|ncursesw/ncurses.h)
19060
19061 cat >>confdefs.h <<\EOF
19062 #define HAVE_NCURSESW_NCURSES_H 1
19063 EOF
19064
19065         ;;
19066 esac
19067
19068 echo "$as_me:19068: checking for terminfo header" >&5
19069 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
19070 if test "${cf_cv_term_header+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073
19074 case "${cf_cv_ncurses_header}" in
19075 (*/ncurses.h|*/ncursesw.h)
19076         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
19077         ;;
19078 (*)
19079         cf_term_header=term.h
19080         ;;
19081 esac
19082
19083 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
19084 do
19085 cat >"conftest.$ac_ext" <<_ACEOF
19086 #line 19086 "configure"
19087 #include "confdefs.h"
19088 #include <stdio.h>
19089 #include <${cf_cv_ncurses_header:-curses.h}>
19090 #include <$cf_test>
19091
19092 int
19093 main (void)
19094 {
19095 int x = auto_left_margin; (void)x
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 rm -f "conftest.$ac_objext"
19101 if { (eval echo "$as_me:19101: \"$ac_compile\"") >&5
19102   (eval $ac_compile) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit "$ac_status"); } &&
19106          { ac_try='test -s "conftest.$ac_objext"'
19107   { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit "$ac_status"); }; }; then
19112
19113         cf_cv_term_header="$cf_test"
19114 else
19115   echo "$as_me: failed program was:" >&5
19116 cat "conftest.$ac_ext" >&5
19117
19118         cf_cv_term_header=unknown
19119
19120 fi
19121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19122         test "$cf_cv_term_header" != unknown && break
19123 done
19124
19125 fi
19126 echo "$as_me:19126: result: $cf_cv_term_header" >&5
19127 echo "${ECHO_T}$cf_cv_term_header" >&6
19128
19129 # Set definitions to allow ifdef'ing to accommodate subdirectories
19130
19131 case "$cf_cv_term_header" in
19132 (*term.h)
19133
19134 cat >>confdefs.h <<\EOF
19135 #define HAVE_TERM_H 1
19136 EOF
19137
19138         ;;
19139 esac
19140
19141 case "$cf_cv_term_header" in
19142 (ncurses/term.h)
19143
19144 cat >>confdefs.h <<\EOF
19145 #define HAVE_NCURSES_TERM_H 1
19146 EOF
19147
19148         ;;
19149 (ncursesw/term.h)
19150
19151 cat >>confdefs.h <<\EOF
19152 #define HAVE_NCURSESW_TERM_H 1
19153 EOF
19154
19155         ;;
19156 esac
19157
19158 # some applications need this, but should check for NCURSES_VERSION
19159
19160 cat >>confdefs.h <<\EOF
19161 #define NCURSES 1
19162 EOF
19163
19164 echo "$as_me:19164: checking for ncurses version" >&5
19165 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
19166 if test "${cf_cv_ncurses_version+set}" = set; then
19167   echo $ECHO_N "(cached) $ECHO_C" >&6
19168 else
19169
19170         cf_cv_ncurses_version=no
19171         cf_tempfile=out$$
19172         rm -f "$cf_tempfile"
19173         if test "$cross_compiling" = yes; then
19174
19175         # This will not work if the preprocessor splits the line after the
19176         # Autoconf token.  The 'unproto' program does that.
19177         cat > "conftest.$ac_ext" <<EOF
19178 #include <${cf_cv_ncurses_header:-curses.h}>
19179 #undef Autoconf
19180 #ifdef NCURSES_VERSION
19181 Autoconf NCURSES_VERSION
19182 #else
19183 #ifdef __NCURSES_H
19184 Autoconf "old"
19185 #endif
19186 ;
19187 #endif
19188 EOF
19189         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
19190         { (eval echo "$as_me:19190: \"$cf_try\"") >&5
19191   (eval $cf_try) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit "$ac_status"); }
19195         if test -f conftest.out ; then
19196                 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
19197                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
19198                 rm -f conftest.out
19199         fi
19200
19201 else
19202   cat >"conftest.$ac_ext" <<_ACEOF
19203 #line 19203 "configure"
19204 #include "confdefs.h"
19205
19206 #include <${cf_cv_ncurses_header:-curses.h}>
19207 #include <stdio.h>
19208 int main(void)
19209 {
19210         FILE *fp = fopen("$cf_tempfile", "w");
19211 #ifdef NCURSES_VERSION
19212 # ifdef NCURSES_VERSION_PATCH
19213         fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
19214 # else
19215         fprintf(fp, "%s\\n", NCURSES_VERSION);
19216 # endif
19217 #else
19218 # ifdef __NCURSES_H
19219         fprintf(fp, "old\\n");
19220 # else
19221         make an error
19222 # endif
19223 #endif
19224         ${cf_cv_main_return:-return}(0);
19225 }
19226 _ACEOF
19227 rm -f "conftest$ac_exeext"
19228 if { (eval echo "$as_me:19228: \"$ac_link\"") >&5
19229   (eval $ac_link) 2>&5
19230   ac_status=$?
19231   echo "$as_me:19231: \$? = $ac_status" >&5
19232   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19233   { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:19236: \$? = $ac_status" >&5
19237   (exit "$ac_status"); }; }; then
19238
19239         cf_cv_ncurses_version=`cat $cf_tempfile`
19240 else
19241   echo "$as_me: program exited with status $ac_status" >&5
19242 echo "$as_me: failed program was:" >&5
19243 cat "conftest.$ac_ext" >&5
19244 fi
19245 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19246 fi
19247         rm -f "$cf_tempfile"
19248
19249 fi
19250 echo "$as_me:19250: result: $cf_cv_ncurses_version" >&5
19251 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
19252 test "$cf_cv_ncurses_version" = no ||
19253 cat >>confdefs.h <<\EOF
19254 #define NCURSES 1
19255 EOF
19256
19257 cf_nculib_root=$cf_cv_screen
19258         # This works, except for the special case where we find gpm, but
19259         # ncurses is in a nonstandard location via $LIBS, and we really want
19260         # to link gpm.
19261 cf_ncurses_LIBS=""
19262 cf_ncurses_SAVE="$LIBS"
19263 echo "$as_me:19263: checking for Gpm_Open in -lgpm" >&5
19264 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
19265 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
19266   echo $ECHO_N "(cached) $ECHO_C" >&6
19267 else
19268   ac_check_lib_save_LIBS=$LIBS
19269 LIBS="-lgpm  $LIBS"
19270 cat >"conftest.$ac_ext" <<_ACEOF
19271 #line 19271 "configure"
19272 #include "confdefs.h"
19273
19274 /* Override any gcc2 internal prototype to avoid an error.  */
19275 #ifdef __cplusplus
19276 extern "C"
19277 #endif
19278 /* We use char because int might match the return type of a gcc2
19279    builtin and then its argument prototype would still apply.  */
19280 char Gpm_Open ();
19281 int
19282 main (void)
19283 {
19284 Gpm_Open ();
19285   ;
19286   return 0;
19287 }
19288 _ACEOF
19289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19290 if { (eval echo "$as_me:19290: \"$ac_link\"") >&5
19291   (eval $ac_link) 2>&5
19292   ac_status=$?
19293   echo "$as_me:19293: \$? = $ac_status" >&5
19294   (exit "$ac_status"); } &&
19295          { ac_try='test -s "conftest$ac_exeext"'
19296   { (eval echo "$as_me:19296: \"$ac_try\"") >&5
19297   (eval $ac_try) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit "$ac_status"); }; }; then
19301   ac_cv_lib_gpm_Gpm_Open=yes
19302 else
19303   echo "$as_me: failed program was:" >&5
19304 cat "conftest.$ac_ext" >&5
19305 ac_cv_lib_gpm_Gpm_Open=no
19306 fi
19307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19308 LIBS=$ac_check_lib_save_LIBS
19309 fi
19310 echo "$as_me:19310: result: $ac_cv_lib_gpm_Gpm_Open" >&5
19311 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
19312 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
19313   echo "$as_me:19313: checking for initscr in -lgpm" >&5
19314 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
19315 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
19316   echo $ECHO_N "(cached) $ECHO_C" >&6
19317 else
19318   ac_check_lib_save_LIBS=$LIBS
19319 LIBS="-lgpm  $LIBS"
19320 cat >"conftest.$ac_ext" <<_ACEOF
19321 #line 19321 "configure"
19322 #include "confdefs.h"
19323
19324 /* Override any gcc2 internal prototype to avoid an error.  */
19325 #ifdef __cplusplus
19326 extern "C"
19327 #endif
19328 /* We use char because int might match the return type of a gcc2
19329    builtin and then its argument prototype would still apply.  */
19330 char initscr ();
19331 int
19332 main (void)
19333 {
19334 initscr ();
19335   ;
19336   return 0;
19337 }
19338 _ACEOF
19339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19340 if { (eval echo "$as_me:19340: \"$ac_link\"") >&5
19341   (eval $ac_link) 2>&5
19342   ac_status=$?
19343   echo "$as_me:19343: \$? = $ac_status" >&5
19344   (exit "$ac_status"); } &&
19345          { ac_try='test -s "conftest$ac_exeext"'
19346   { (eval echo "$as_me:19346: \"$ac_try\"") >&5
19347   (eval $ac_try) 2>&5
19348   ac_status=$?
19349   echo "$as_me:19349: \$? = $ac_status" >&5
19350   (exit "$ac_status"); }; }; then
19351   ac_cv_lib_gpm_initscr=yes
19352 else
19353   echo "$as_me: failed program was:" >&5
19354 cat "conftest.$ac_ext" >&5
19355 ac_cv_lib_gpm_initscr=no
19356 fi
19357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19358 LIBS=$ac_check_lib_save_LIBS
19359 fi
19360 echo "$as_me:19360: result: $ac_cv_lib_gpm_initscr" >&5
19361 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
19362 if test "$ac_cv_lib_gpm_initscr" = yes; then
19363   LIBS="$cf_ncurses_SAVE"
19364 else
19365   cf_ncurses_LIBS="-lgpm"
19366 fi
19367
19368 fi
19369
19370 case "$host_os" in
19371 (freebsd*)
19372         # This is only necessary if you are linking against an obsolete
19373         # version of ncurses (but it should do no harm, since it's static).
19374         if test "$cf_nculib_root" = ncurses ; then
19375                 echo "$as_me:19375: checking for tgoto in -lmytinfo" >&5
19376 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
19377 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
19378   echo $ECHO_N "(cached) $ECHO_C" >&6
19379 else
19380   ac_check_lib_save_LIBS=$LIBS
19381 LIBS="-lmytinfo  $LIBS"
19382 cat >"conftest.$ac_ext" <<_ACEOF
19383 #line 19383 "configure"
19384 #include "confdefs.h"
19385
19386 /* Override any gcc2 internal prototype to avoid an error.  */
19387 #ifdef __cplusplus
19388 extern "C"
19389 #endif
19390 /* We use char because int might match the return type of a gcc2
19391    builtin and then its argument prototype would still apply.  */
19392 char tgoto ();
19393 int
19394 main (void)
19395 {
19396 tgoto ();
19397   ;
19398   return 0;
19399 }
19400 _ACEOF
19401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19402 if { (eval echo "$as_me:19402: \"$ac_link\"") >&5
19403   (eval $ac_link) 2>&5
19404   ac_status=$?
19405   echo "$as_me:19405: \$? = $ac_status" >&5
19406   (exit "$ac_status"); } &&
19407          { ac_try='test -s "conftest$ac_exeext"'
19408   { (eval echo "$as_me:19408: \"$ac_try\"") >&5
19409   (eval $ac_try) 2>&5
19410   ac_status=$?
19411   echo "$as_me:19411: \$? = $ac_status" >&5
19412   (exit "$ac_status"); }; }; then
19413   ac_cv_lib_mytinfo_tgoto=yes
19414 else
19415   echo "$as_me: failed program was:" >&5
19416 cat "conftest.$ac_ext" >&5
19417 ac_cv_lib_mytinfo_tgoto=no
19418 fi
19419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19420 LIBS=$ac_check_lib_save_LIBS
19421 fi
19422 echo "$as_me:19422: result: $ac_cv_lib_mytinfo_tgoto" >&5
19423 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
19424 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
19425   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
19426 fi
19427
19428         fi
19429         ;;
19430 esac
19431
19432 cf_add_libs="$LIBS"
19433 # reverse order
19434 cf_add_0lib=
19435 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19436 # filter duplicates
19437 for cf_add_1lib in $cf_add_0lib; do
19438         for cf_add_2lib in $cf_add_libs; do
19439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19440                         cf_add_1lib=
19441                         break
19442                 fi
19443         done
19444         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19445 done
19446 LIBS="$cf_add_libs"
19447
19448 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
19449 then
19450
19451 cf_add_libs="$LIBS"
19452 # reverse order
19453 cf_add_0lib=
19454 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19455 # filter duplicates
19456 for cf_add_1lib in $cf_add_0lib; do
19457         for cf_add_2lib in $cf_add_libs; do
19458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19459                         cf_add_1lib=
19460                         break
19461                 fi
19462         done
19463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19464 done
19465 LIBS="$cf_add_libs"
19466
19467 else
19468
19469         eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
19470         cf_libdir=""
19471         echo "$as_me:19471: checking for initscr" >&5
19472 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
19473 if test "${ac_cv_func_initscr+set}" = set; then
19474   echo $ECHO_N "(cached) $ECHO_C" >&6
19475 else
19476   cat >"conftest.$ac_ext" <<_ACEOF
19477 #line 19477 "configure"
19478 #include "confdefs.h"
19479 #define initscr autoconf_temporary
19480 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19481 #undef initscr
19482
19483 #ifdef __cplusplus
19484 extern "C"
19485 #endif
19486
19487 /* We use char because int might match the return type of a gcc2
19488    builtin and then its argument prototype would still apply.  */
19489 char initscr (void);
19490
19491 int
19492 main (void)
19493 {
19494
19495 /* The GNU C library defines stubs for functions which it implements
19496     to always fail with ENOSYS.  Some functions are actually named
19497     something starting with __ and the normal name is an alias.  */
19498 #if defined (__stub_initscr) || defined (__stub___initscr)
19499 #error found stub for initscr
19500 #endif
19501
19502         return initscr ();
19503   ;
19504   return 0;
19505 }
19506 _ACEOF
19507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19508 if { (eval echo "$as_me:19508: \"$ac_link\"") >&5
19509   (eval $ac_link) 2>&5
19510   ac_status=$?
19511   echo "$as_me:19511: \$? = $ac_status" >&5
19512   (exit "$ac_status"); } &&
19513          { ac_try='test -s "conftest$ac_exeext"'
19514   { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515   (eval $ac_try) 2>&5
19516   ac_status=$?
19517   echo "$as_me:19517: \$? = $ac_status" >&5
19518   (exit "$ac_status"); }; }; then
19519   ac_cv_func_initscr=yes
19520 else
19521   echo "$as_me: failed program was:" >&5
19522 cat "conftest.$ac_ext" >&5
19523 ac_cv_func_initscr=no
19524 fi
19525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19526 fi
19527 echo "$as_me:19527: result: $ac_cv_func_initscr" >&5
19528 echo "${ECHO_T}$ac_cv_func_initscr" >&6
19529 if test "$ac_cv_func_initscr" = yes; then
19530   eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19531 else
19532
19533                 cf_save_LIBS="$LIBS"
19534                 echo "$as_me:19534: checking for initscr in -l$cf_nculib_root" >&5
19535 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
19536                 LIBS="-l$cf_nculib_root $LIBS"
19537                 cat >"conftest.$ac_ext" <<_ACEOF
19538 #line 19538 "configure"
19539 #include "confdefs.h"
19540 #include <${cf_cv_ncurses_header:-curses.h}>
19541 int
19542 main (void)
19543 {
19544 initscr()
19545   ;
19546   return 0;
19547 }
19548 _ACEOF
19549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19550 if { (eval echo "$as_me:19550: \"$ac_link\"") >&5
19551   (eval $ac_link) 2>&5
19552   ac_status=$?
19553   echo "$as_me:19553: \$? = $ac_status" >&5
19554   (exit "$ac_status"); } &&
19555          { ac_try='test -s "conftest$ac_exeext"'
19556   { (eval echo "$as_me:19556: \"$ac_try\"") >&5
19557   (eval $ac_try) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit "$ac_status"); }; }; then
19561   echo "$as_me:19561: result: yes" >&5
19562 echo "${ECHO_T}yes" >&6
19563                          eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19564
19565 else
19566   echo "$as_me: failed program was:" >&5
19567 cat "conftest.$ac_ext" >&5
19568 echo "$as_me:19568: result: no" >&5
19569 echo "${ECHO_T}no" >&6
19570
19571 cf_search=
19572 cf_library_path_list=""
19573 if test -n "${LDFLAGS}${LIBS}" ; then
19574         for cf_library_path in $LDFLAGS $LIBS
19575         do
19576                 case "$cf_library_path" in
19577                 (-L*)
19578                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
19579
19580 test "x$cf_library_path" != "xNONE" && \
19581 test -d "$cf_library_path" && \
19582  {
19583         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
19584         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
19585         test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
19586         test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
19587         test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
19588         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"
19589 }
19590
19591                         cf_library_path_list="$cf_library_path_list $cf_search"
19592                         ;;
19593                 esac
19594         done
19595 fi
19596
19597 cf_search=
19598
19599 test "x$prefix" != "xNONE" && \
19600 test -d "$prefix" && \
19601  {
19602         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19603         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
19604         test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
19605         test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
19606         test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
19607         test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
19608 }
19609
19610 for cf_subdir_prefix in \
19611         /usr \
19612         /usr/local \
19613         /usr/pkg \
19614         /opt \
19615         /opt/local \
19616         $HOME
19617 do
19618
19619 test "x$cf_subdir_prefix" != "x$prefix" && \
19620 test -d "$cf_subdir_prefix" && \
19621 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
19622         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19623         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19624         test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
19625         test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
19626         test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
19627         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"
19628 }
19629
19630 done
19631
19632 cf_search="$cf_library_path_list $cf_search"
19633
19634                         for cf_libdir in $cf_search
19635                         do
19636                                 echo "$as_me:19636: checking for -l$cf_nculib_root in $cf_libdir" >&5
19637 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
19638                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
19639                                 cat >"conftest.$ac_ext" <<_ACEOF
19640 #line 19640 "configure"
19641 #include "confdefs.h"
19642 #include <${cf_cv_ncurses_header:-curses.h}>
19643 int
19644 main (void)
19645 {
19646 initscr()
19647   ;
19648   return 0;
19649 }
19650 _ACEOF
19651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19652 if { (eval echo "$as_me:19652: \"$ac_link\"") >&5
19653   (eval $ac_link) 2>&5
19654   ac_status=$?
19655   echo "$as_me:19655: \$? = $ac_status" >&5
19656   (exit "$ac_status"); } &&
19657          { ac_try='test -s "conftest$ac_exeext"'
19658   { (eval echo "$as_me:19658: \"$ac_try\"") >&5
19659   (eval $ac_try) 2>&5
19660   ac_status=$?
19661   echo "$as_me:19661: \$? = $ac_status" >&5
19662   (exit "$ac_status"); }; }; then
19663   echo "$as_me:19663: result: yes" >&5
19664 echo "${ECHO_T}yes" >&6
19665                                          eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19666                                          break
19667 else
19668   echo "$as_me: failed program was:" >&5
19669 cat "conftest.$ac_ext" >&5
19670 echo "$as_me:19670: result: no" >&5
19671 echo "${ECHO_T}no" >&6
19672                                          LIBS="$cf_save_LIBS"
19673 fi
19674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19675                         done
19676
19677 fi
19678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19679
19680 fi
19681
19682 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
19683
19684 if test "$cf_found_library" = no ; then
19685         { { echo "$as_me:19685: error: Cannot link $cf_nculib_root library" >&5
19686 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
19687    { (exit 1); exit 1; }; }
19688 fi
19689
19690 fi
19691
19692 if test -n "$cf_ncurses_LIBS" ; then
19693         echo "$as_me:19693: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
19694 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
19695         cf_ncurses_SAVE="$LIBS"
19696         for p in $cf_ncurses_LIBS ; do
19697                 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
19698                 if test "$q" != "$LIBS" ; then
19699                         LIBS="$q"
19700                 fi
19701         done
19702         cat >"conftest.$ac_ext" <<_ACEOF
19703 #line 19703 "configure"
19704 #include "confdefs.h"
19705 #include <${cf_cv_ncurses_header:-curses.h}>
19706 int
19707 main (void)
19708 {
19709 initscr(); mousemask(0,0); tigetstr((char *)0);
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19715 if { (eval echo "$as_me:19715: \"$ac_link\"") >&5
19716   (eval $ac_link) 2>&5
19717   ac_status=$?
19718   echo "$as_me:19718: \$? = $ac_status" >&5
19719   (exit "$ac_status"); } &&
19720          { ac_try='test -s "conftest$ac_exeext"'
19721   { (eval echo "$as_me:19721: \"$ac_try\"") >&5
19722   (eval $ac_try) 2>&5
19723   ac_status=$?
19724   echo "$as_me:19724: \$? = $ac_status" >&5
19725   (exit "$ac_status"); }; }; then
19726   echo "$as_me:19726: result: yes" >&5
19727 echo "${ECHO_T}yes" >&6
19728 else
19729   echo "$as_me: failed program was:" >&5
19730 cat "conftest.$ac_ext" >&5
19731 echo "$as_me:19731: result: no" >&5
19732 echo "${ECHO_T}no" >&6
19733                  LIBS="$cf_ncurses_SAVE"
19734 fi
19735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19736 fi
19737
19738 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19739
19740 cat >>confdefs.h <<EOF
19741 #define $cf_nculib_ROOT 1
19742 EOF
19743
19744         fi
19745 else
19746         NCURSES_CONFIG=none
19747 fi
19748
19749         ;;
19750 (pdcurses)
19751
19752 cf_x_athena=${cf_x_athena:-Xaw}
19753
19754 echo "$as_me:19754: checking if you want to link with Xaw 3d library" >&5
19755 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
19756 withval=
19757
19758 # Check whether --with-Xaw3d or --without-Xaw3d was given.
19759 if test "${with_Xaw3d+set}" = set; then
19760   withval="$with_Xaw3d"
19761
19762 fi;
19763 if test "$withval" = yes ; then
19764         cf_x_athena=Xaw3d
19765         echo "$as_me:19765: result: yes" >&5
19766 echo "${ECHO_T}yes" >&6
19767 else
19768         echo "$as_me:19768: result: no" >&5
19769 echo "${ECHO_T}no" >&6
19770 fi
19771
19772 echo "$as_me:19772: checking if you want to link with Xaw 3d xft library" >&5
19773 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
19774 withval=
19775
19776 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
19777 if test "${with_Xaw3dxft+set}" = set; then
19778   withval="$with_Xaw3dxft"
19779
19780 fi;
19781 if test "$withval" = yes ; then
19782         cf_x_athena=Xaw3dxft
19783         echo "$as_me:19783: result: yes" >&5
19784 echo "${ECHO_T}yes" >&6
19785 else
19786         echo "$as_me:19786: result: no" >&5
19787 echo "${ECHO_T}no" >&6
19788 fi
19789
19790 echo "$as_me:19790: checking if you want to link with neXT Athena library" >&5
19791 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
19792 withval=
19793
19794 # Check whether --with-neXtaw or --without-neXtaw was given.
19795 if test "${with_neXtaw+set}" = set; then
19796   withval="$with_neXtaw"
19797
19798 fi;
19799 if test "$withval" = yes ; then
19800         cf_x_athena=neXtaw
19801         echo "$as_me:19801: result: yes" >&5
19802 echo "${ECHO_T}yes" >&6
19803 else
19804         echo "$as_me:19804: result: no" >&5
19805 echo "${ECHO_T}no" >&6
19806 fi
19807
19808 echo "$as_me:19808: checking if you want to link with Athena-Plus library" >&5
19809 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
19810 withval=
19811
19812 # Check whether --with-XawPlus or --without-XawPlus was given.
19813 if test "${with_XawPlus+set}" = set; then
19814   withval="$with_XawPlus"
19815
19816 fi;
19817 if test "$withval" = yes ; then
19818         cf_x_athena=XawPlus
19819         echo "$as_me:19819: result: yes" >&5
19820 echo "${ECHO_T}yes" >&6
19821 else
19822         echo "$as_me:19822: result: no" >&5
19823 echo "${ECHO_T}no" >&6
19824 fi
19825
19826 cf_x_athena_lib=""
19827
19828 if test "$PKG_CONFIG" != none ; then
19829         cf_athena_list=
19830         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
19831         for cf_athena_pkg in \
19832                 $cf_athena_list \
19833                 ${cf_x_athena} \
19834                 ${cf_x_athena}-devel \
19835                 lib${cf_x_athena} \
19836                 lib${cf_x_athena}-devel
19837         do
19838
19839 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
19840         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
19841
19842 echo "${as_me:-configure}:19842: testing found package $cf_athena_pkg ..." 1>&5
19843
19844         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
19845         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
19846         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
19847
19848 echo "${as_me:-configure}:19848: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19849
19850         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
19851
19852 echo "${as_me:-configure}:19852: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
19853
19854 cf_fix_cppflags=no
19855 cf_new_cflags=
19856 cf_new_cppflags=
19857 cf_new_extra_cppflags=
19858
19859 for cf_add_cflags in $cf_pkgconfig_incs
19860 do
19861 case "$cf_fix_cppflags" in
19862 (no)
19863         case "$cf_add_cflags" in
19864         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19865                 case "$cf_add_cflags" in
19866                 (-D*)
19867                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19868
19869                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19870                                 && test -z "${cf_tst_cflags}" \
19871                                 && cf_fix_cppflags=yes
19872
19873                         if test "$cf_fix_cppflags" = yes ; then
19874
19875         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19876         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19877
19878                                 continue
19879                         elif test "${cf_tst_cflags}" = "\"'" ; then
19880
19881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19883
19884                                 continue
19885                         fi
19886                         ;;
19887                 esac
19888                 case "$CPPFLAGS" in
19889                 (*$cf_add_cflags)
19890                         ;;
19891                 (*)
19892                         case "$cf_add_cflags" in
19893                         (-D*)
19894                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19895
19896 CPPFLAGS=`echo "$CPPFLAGS" | \
19897         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19898                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19899
19900                                 ;;
19901                         esac
19902
19903         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19904         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19905
19906                         ;;
19907                 esac
19908                 ;;
19909         (*)
19910
19911         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19912         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19913
19914                 ;;
19915         esac
19916         ;;
19917 (yes)
19918
19919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19921
19922         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19923
19924         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19925                 && test -z "${cf_tst_cflags}" \
19926                 && cf_fix_cppflags=no
19927         ;;
19928 esac
19929 done
19930
19931 if test -n "$cf_new_cflags" ; then
19932
19933         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19934         CFLAGS="${CFLAGS}$cf_new_cflags"
19935
19936 fi
19937
19938 if test -n "$cf_new_cppflags" ; then
19939
19940         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19941         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19942
19943 fi
19944
19945 if test -n "$cf_new_extra_cppflags" ; then
19946
19947         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19948         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19949
19950 fi
19951
19952 cf_add_libs="$LIBS"
19953 # reverse order
19954 cf_add_0lib=
19955 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19956 # filter duplicates
19957 for cf_add_1lib in $cf_add_0lib; do
19958         for cf_add_2lib in $cf_add_libs; do
19959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19960                         cf_add_1lib=
19961                         break
19962                 fi
19963         done
19964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19965 done
19966 LIBS="$cf_add_libs"
19967
19968                         cf_x_athena_lib="$cf_pkgconfig_libs"
19969
19970 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19971
19972                         cat >>confdefs.h <<EOF
19973 #define $cf_x_athena_LIBS 1
19974 EOF
19975
19976         for cf_trim_lib in Xmu Xt X11
19977         do
19978                 case "$LIBS" in
19979                 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
19980                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
19981                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
19982
19983 echo "${as_me:-configure}:19983: testing ..trimmed $LIBS ..." 1>&5
19984
19985                         ;;
19986                 esac
19987         done
19988
19989 echo "$as_me:19989: checking for usable $cf_x_athena/Xmu package" >&5
19990 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
19991 if test "${cf_cv_xaw_compat+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994
19995 cat >"conftest.$ac_ext" <<_ACEOF
19996 #line 19996 "configure"
19997 #include "confdefs.h"
19998
19999 #include <X11/Xmu/CharSet.h>
20000
20001 int
20002 main (void)
20003 {
20004
20005 int check = XmuCompareISOLatin1("big", "small");
20006 (void)check;
20007
20008   ;
20009   return 0;
20010 }
20011 _ACEOF
20012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20013 if { (eval echo "$as_me:20013: \"$ac_link\"") >&5
20014   (eval $ac_link) 2>&5
20015   ac_status=$?
20016   echo "$as_me:20016: \$? = $ac_status" >&5
20017   (exit "$ac_status"); } &&
20018          { ac_try='test -s "conftest$ac_exeext"'
20019   { (eval echo "$as_me:20019: \"$ac_try\"") >&5
20020   (eval $ac_try) 2>&5
20021   ac_status=$?
20022   echo "$as_me:20022: \$? = $ac_status" >&5
20023   (exit "$ac_status"); }; }; then
20024   cf_cv_xaw_compat=yes
20025 else
20026   echo "$as_me: failed program was:" >&5
20027 cat "conftest.$ac_ext" >&5
20028 cf_cv_xaw_compat=no
20029 fi
20030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20031 fi
20032 echo "$as_me:20032: result: $cf_cv_xaw_compat" >&5
20033 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
20034
20035                         if test "$cf_cv_xaw_compat" = no
20036                         then
20037                                 # workaround for broken ".pc" files...
20038                                 case "$cf_x_athena_lib" in
20039                                 (*-lXmu*)
20040                                         ;;
20041                                 (*)
20042                                         test -n "$verbose" && echo "    work around broken package" 1>&6
20043
20044 echo "${as_me:-configure}:20044: testing work around broken package ..." 1>&5
20045
20046                                         cf_save_xmu="$LIBS"
20047                                         cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
20048
20049 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
20050         test -n "$verbose" && echo "    found package xmu" 1>&6
20051
20052 echo "${as_me:-configure}:20052: testing found package xmu ..." 1>&5
20053
20054         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
20055         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
20056         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
20057
20058 echo "${as_me:-configure}:20058: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20059
20060         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
20061
20062 echo "${as_me:-configure}:20062: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
20063
20064 cf_fix_cppflags=no
20065 cf_new_cflags=
20066 cf_new_cppflags=
20067 cf_new_extra_cppflags=
20068
20069 for cf_add_cflags in $cf_pkgconfig_incs
20070 do
20071 case "$cf_fix_cppflags" in
20072 (no)
20073         case "$cf_add_cflags" in
20074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20075                 case "$cf_add_cflags" in
20076                 (-D*)
20077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20078
20079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20080                                 && test -z "${cf_tst_cflags}" \
20081                                 && cf_fix_cppflags=yes
20082
20083                         if test "$cf_fix_cppflags" = yes ; then
20084
20085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20087
20088                                 continue
20089                         elif test "${cf_tst_cflags}" = "\"'" ; then
20090
20091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20093
20094                                 continue
20095                         fi
20096                         ;;
20097                 esac
20098                 case "$CPPFLAGS" in
20099                 (*$cf_add_cflags)
20100                         ;;
20101                 (*)
20102                         case "$cf_add_cflags" in
20103                         (-D*)
20104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20105
20106 CPPFLAGS=`echo "$CPPFLAGS" | \
20107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20109
20110                                 ;;
20111                         esac
20112
20113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20115
20116                         ;;
20117                 esac
20118                 ;;
20119         (*)
20120
20121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20123
20124                 ;;
20125         esac
20126         ;;
20127 (yes)
20128
20129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20131
20132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20133
20134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20135                 && test -z "${cf_tst_cflags}" \
20136                 && cf_fix_cppflags=no
20137         ;;
20138 esac
20139 done
20140
20141 if test -n "$cf_new_cflags" ; then
20142
20143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20144         CFLAGS="${CFLAGS}$cf_new_cflags"
20145
20146 fi
20147
20148 if test -n "$cf_new_cppflags" ; then
20149
20150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20152
20153 fi
20154
20155 if test -n "$cf_new_extra_cppflags" ; then
20156
20157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20159
20160 fi
20161
20162 cf_add_libs="$LIBS"
20163 # reverse order
20164 cf_add_0lib=
20165 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20166 # filter duplicates
20167 for cf_add_1lib in $cf_add_0lib; do
20168         for cf_add_2lib in $cf_add_libs; do
20169                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20170                         cf_add_1lib=
20171                         break
20172                 fi
20173         done
20174         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20175 done
20176 LIBS="$cf_add_libs"
20177
20178                                                         LIBS="$cf_save_xmu"
20179
20180 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
20181
20182 echo "${as_me:-configure}:20182: testing ...before $LIBS ..." 1>&5
20183
20184 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
20185 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
20186
20187 echo "${as_me:-configure}:20187: testing ...after  $LIBS ..." 1>&5
20188
20189 else
20190         cf_pkgconfig_incs=
20191         cf_pkgconfig_libs=
20192
20193 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
20194
20195 echo "${as_me:-configure}:20195: testing ...before $LIBS ..." 1>&5
20196
20197 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
20198 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
20199
20200 echo "${as_me:-configure}:20200: testing ...after  $LIBS ..." 1>&5
20201
20202 fi
20203
20204         for cf_trim_lib in Xmu Xt X11
20205         do
20206                 case "$LIBS" in
20207                 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
20208                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
20209                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
20210
20211 echo "${as_me:-configure}:20211: testing ..trimmed $LIBS ..." 1>&5
20212
20213                         ;;
20214                 esac
20215         done
20216
20217                                         ;;
20218                                 esac
20219                         fi
20220
20221                         break
20222 else
20223         cf_pkgconfig_incs=
20224         cf_pkgconfig_libs=
20225         :
20226 fi
20227
20228         done
20229 fi
20230
20231 if test -z "$cf_x_athena_lib" ; then
20232
20233 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
20234         test -n "$verbose" && echo "    found package Xext" 1>&6
20235
20236 echo "${as_me:-configure}:20236: testing found package Xext ..." 1>&5
20237
20238         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
20239         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
20240         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
20241
20242 echo "${as_me:-configure}:20242: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20243
20244         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
20245
20246 echo "${as_me:-configure}:20246: testing package Xext 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="$LIBS"
20347 # reverse order
20348 cf_add_0lib=
20349 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20350 # filter duplicates
20351 for cf_add_1lib in $cf_add_0lib; do
20352         for cf_add_2lib in $cf_add_libs; do
20353                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20354                         cf_add_1lib=
20355                         break
20356                 fi
20357         done
20358         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20359 done
20360 LIBS="$cf_add_libs"
20361
20362         :
20363 else
20364         cf_pkgconfig_incs=
20365         cf_pkgconfig_libs=
20366
20367         echo "$as_me:20367: checking for XextCreateExtension in -lXext" >&5
20368 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
20369 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
20370   echo $ECHO_N "(cached) $ECHO_C" >&6
20371 else
20372   ac_check_lib_save_LIBS=$LIBS
20373 LIBS="-lXext  $LIBS"
20374 cat >"conftest.$ac_ext" <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 /* Override any gcc2 internal prototype to avoid an error.  */
20379 #ifdef __cplusplus
20380 extern "C"
20381 #endif
20382 /* We use char because int might match the return type of a gcc2
20383    builtin and then its argument prototype would still apply.  */
20384 char XextCreateExtension ();
20385 int
20386 main (void)
20387 {
20388 XextCreateExtension ();
20389   ;
20390   return 0;
20391 }
20392 _ACEOF
20393 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20394 if { (eval echo "$as_me:20394: \"$ac_link\"") >&5
20395   (eval $ac_link) 2>&5
20396   ac_status=$?
20397   echo "$as_me:20397: \$? = $ac_status" >&5
20398   (exit "$ac_status"); } &&
20399          { ac_try='test -s "conftest$ac_exeext"'
20400   { (eval echo "$as_me:20400: \"$ac_try\"") >&5
20401   (eval $ac_try) 2>&5
20402   ac_status=$?
20403   echo "$as_me:20403: \$? = $ac_status" >&5
20404   (exit "$ac_status"); }; }; then
20405   ac_cv_lib_Xext_XextCreateExtension=yes
20406 else
20407   echo "$as_me: failed program was:" >&5
20408 cat "conftest.$ac_ext" >&5
20409 ac_cv_lib_Xext_XextCreateExtension=no
20410 fi
20411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20412 LIBS=$ac_check_lib_save_LIBS
20413 fi
20414 echo "$as_me:20414: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
20415 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
20416 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
20417
20418 cf_add_libs="$LIBS"
20419 # reverse order
20420 cf_add_0lib=
20421 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20422 # filter duplicates
20423 for cf_add_1lib in $cf_add_0lib; do
20424         for cf_add_2lib in $cf_add_libs; do
20425                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20426                         cf_add_1lib=
20427                         break
20428                 fi
20429         done
20430         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20431 done
20432 LIBS="$cf_add_libs"
20433
20434 fi
20435
20436 fi
20437
20438 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
20439 # in some cases has installed dummy files in the former, other cases replaced
20440 # it with a link to the new location).  This complicates the configure script.
20441 # Check for that pitfall, and recover using pkg-config
20442 #
20443 # If none of these are set, the configuration is almost certainly broken.
20444 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
20445 then
20446
20447 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
20448         test -n "$verbose" && echo "    found package x11" 1>&6
20449
20450 echo "${as_me:-configure}:20450: testing found package x11 ..." 1>&5
20451
20452         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
20453         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
20454         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
20455
20456 echo "${as_me:-configure}:20456: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20457
20458         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
20459
20460 echo "${as_me:-configure}:20460: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
20461
20462 cf_fix_cppflags=no
20463 cf_new_cflags=
20464 cf_new_cppflags=
20465 cf_new_extra_cppflags=
20466
20467 for cf_add_cflags in $cf_pkgconfig_incs
20468 do
20469 case "$cf_fix_cppflags" in
20470 (no)
20471         case "$cf_add_cflags" in
20472         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20473                 case "$cf_add_cflags" in
20474                 (-D*)
20475                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20476
20477                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20478                                 && test -z "${cf_tst_cflags}" \
20479                                 && cf_fix_cppflags=yes
20480
20481                         if test "$cf_fix_cppflags" = yes ; then
20482
20483         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20484         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20485
20486                                 continue
20487                         elif test "${cf_tst_cflags}" = "\"'" ; then
20488
20489         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20490         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20491
20492                                 continue
20493                         fi
20494                         ;;
20495                 esac
20496                 case "$CPPFLAGS" in
20497                 (*$cf_add_cflags)
20498                         ;;
20499                 (*)
20500                         case "$cf_add_cflags" in
20501                         (-D*)
20502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20503
20504 CPPFLAGS=`echo "$CPPFLAGS" | \
20505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20507
20508                                 ;;
20509                         esac
20510
20511         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20512         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20513
20514                         ;;
20515                 esac
20516                 ;;
20517         (*)
20518
20519         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20520         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20521
20522                 ;;
20523         esac
20524         ;;
20525 (yes)
20526
20527         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20528         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20529
20530         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20531
20532         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20533                 && test -z "${cf_tst_cflags}" \
20534                 && cf_fix_cppflags=no
20535         ;;
20536 esac
20537 done
20538
20539 if test -n "$cf_new_cflags" ; then
20540
20541         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20542         CFLAGS="${CFLAGS}$cf_new_cflags"
20543
20544 fi
20545
20546 if test -n "$cf_new_cppflags" ; then
20547
20548         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20549         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20550
20551 fi
20552
20553 if test -n "$cf_new_extra_cppflags" ; then
20554
20555         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20556         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20557
20558 fi
20559
20560 cf_add_libs="$LIBS"
20561 # reverse order
20562 cf_add_0lib=
20563 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20564 # filter duplicates
20565 for cf_add_1lib in $cf_add_0lib; do
20566         for cf_add_2lib in $cf_add_libs; do
20567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20568                         cf_add_1lib=
20569                         break
20570                 fi
20571         done
20572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20573 done
20574 LIBS="$cf_add_libs"
20575
20576         :
20577 else
20578         cf_pkgconfig_incs=
20579         cf_pkgconfig_libs=
20580         { echo "$as_me:20580: WARNING: unable to find X11 library" >&5
20581 echo "$as_me: WARNING: unable to find X11 library" >&2;}
20582 fi
20583
20584 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
20585         test -n "$verbose" && echo "    found package ice" 1>&6
20586
20587 echo "${as_me:-configure}:20587: testing found package ice ..." 1>&5
20588
20589         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
20590         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
20591         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
20592
20593 echo "${as_me:-configure}:20593: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20594
20595         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
20596
20597 echo "${as_me:-configure}:20597: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
20598
20599 cf_fix_cppflags=no
20600 cf_new_cflags=
20601 cf_new_cppflags=
20602 cf_new_extra_cppflags=
20603
20604 for cf_add_cflags in $cf_pkgconfig_incs
20605 do
20606 case "$cf_fix_cppflags" in
20607 (no)
20608         case "$cf_add_cflags" in
20609         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20610                 case "$cf_add_cflags" in
20611                 (-D*)
20612                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20613
20614                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20615                                 && test -z "${cf_tst_cflags}" \
20616                                 && cf_fix_cppflags=yes
20617
20618                         if test "$cf_fix_cppflags" = yes ; then
20619
20620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20622
20623                                 continue
20624                         elif test "${cf_tst_cflags}" = "\"'" ; then
20625
20626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20628
20629                                 continue
20630                         fi
20631                         ;;
20632                 esac
20633                 case "$CPPFLAGS" in
20634                 (*$cf_add_cflags)
20635                         ;;
20636                 (*)
20637                         case "$cf_add_cflags" in
20638                         (-D*)
20639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20640
20641 CPPFLAGS=`echo "$CPPFLAGS" | \
20642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20644
20645                                 ;;
20646                         esac
20647
20648         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20649         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20650
20651                         ;;
20652                 esac
20653                 ;;
20654         (*)
20655
20656         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20657         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20658
20659                 ;;
20660         esac
20661         ;;
20662 (yes)
20663
20664         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20665         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20666
20667         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20668
20669         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20670                 && test -z "${cf_tst_cflags}" \
20671                 && cf_fix_cppflags=no
20672         ;;
20673 esac
20674 done
20675
20676 if test -n "$cf_new_cflags" ; then
20677
20678         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20679         CFLAGS="${CFLAGS}$cf_new_cflags"
20680
20681 fi
20682
20683 if test -n "$cf_new_cppflags" ; then
20684
20685         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20686         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20687
20688 fi
20689
20690 if test -n "$cf_new_extra_cppflags" ; then
20691
20692         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20693         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20694
20695 fi
20696
20697 cf_add_libs="$LIBS"
20698 # reverse order
20699 cf_add_0lib=
20700 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20701 # filter duplicates
20702 for cf_add_1lib in $cf_add_0lib; do
20703         for cf_add_2lib in $cf_add_libs; do
20704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20705                         cf_add_1lib=
20706                         break
20707                 fi
20708         done
20709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20710 done
20711 LIBS="$cf_add_libs"
20712
20713         :
20714 else
20715         cf_pkgconfig_incs=
20716         cf_pkgconfig_libs=
20717         { echo "$as_me:20717: WARNING: unable to find ICE library" >&5
20718 echo "$as_me: WARNING: unable to find ICE library" >&2;}
20719 fi
20720
20721 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
20722         test -n "$verbose" && echo "    found package sm" 1>&6
20723
20724 echo "${as_me:-configure}:20724: testing found package sm ..." 1>&5
20725
20726         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
20727         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
20728         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
20729
20730 echo "${as_me:-configure}:20730: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20731
20732         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
20733
20734 echo "${as_me:-configure}:20734: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
20735
20736 cf_fix_cppflags=no
20737 cf_new_cflags=
20738 cf_new_cppflags=
20739 cf_new_extra_cppflags=
20740
20741 for cf_add_cflags in $cf_pkgconfig_incs
20742 do
20743 case "$cf_fix_cppflags" in
20744 (no)
20745         case "$cf_add_cflags" in
20746         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20747                 case "$cf_add_cflags" in
20748                 (-D*)
20749                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20750
20751                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20752                                 && test -z "${cf_tst_cflags}" \
20753                                 && cf_fix_cppflags=yes
20754
20755                         if test "$cf_fix_cppflags" = yes ; then
20756
20757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20759
20760                                 continue
20761                         elif test "${cf_tst_cflags}" = "\"'" ; then
20762
20763         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20764         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20765
20766                                 continue
20767                         fi
20768                         ;;
20769                 esac
20770                 case "$CPPFLAGS" in
20771                 (*$cf_add_cflags)
20772                         ;;
20773                 (*)
20774                         case "$cf_add_cflags" in
20775                         (-D*)
20776                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20777
20778 CPPFLAGS=`echo "$CPPFLAGS" | \
20779         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20780                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20781
20782                                 ;;
20783                         esac
20784
20785         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20786         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20787
20788                         ;;
20789                 esac
20790                 ;;
20791         (*)
20792
20793         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20794         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20795
20796                 ;;
20797         esac
20798         ;;
20799 (yes)
20800
20801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20803
20804         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20805
20806         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20807                 && test -z "${cf_tst_cflags}" \
20808                 && cf_fix_cppflags=no
20809         ;;
20810 esac
20811 done
20812
20813 if test -n "$cf_new_cflags" ; then
20814
20815         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20816         CFLAGS="${CFLAGS}$cf_new_cflags"
20817
20818 fi
20819
20820 if test -n "$cf_new_cppflags" ; then
20821
20822         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20823         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20824
20825 fi
20826
20827 if test -n "$cf_new_extra_cppflags" ; then
20828
20829         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20830         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20831
20832 fi
20833
20834 cf_add_libs="$LIBS"
20835 # reverse order
20836 cf_add_0lib=
20837 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20838 # filter duplicates
20839 for cf_add_1lib in $cf_add_0lib; do
20840         for cf_add_2lib in $cf_add_libs; do
20841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20842                         cf_add_1lib=
20843                         break
20844                 fi
20845         done
20846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20847 done
20848 LIBS="$cf_add_libs"
20849
20850         :
20851 else
20852         cf_pkgconfig_incs=
20853         cf_pkgconfig_libs=
20854         { echo "$as_me:20854: WARNING: unable to find SM library" >&5
20855 echo "$as_me: WARNING: unable to find SM library" >&2;}
20856 fi
20857
20858 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
20859         test -n "$verbose" && echo "    found package xt" 1>&6
20860
20861 echo "${as_me:-configure}:20861: testing found package xt ..." 1>&5
20862
20863         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
20864         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
20865         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
20866
20867 echo "${as_me:-configure}:20867: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20868
20869         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
20870
20871 echo "${as_me:-configure}:20871: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
20872
20873 cf_fix_cppflags=no
20874 cf_new_cflags=
20875 cf_new_cppflags=
20876 cf_new_extra_cppflags=
20877
20878 for cf_add_cflags in $cf_pkgconfig_incs
20879 do
20880 case "$cf_fix_cppflags" in
20881 (no)
20882         case "$cf_add_cflags" in
20883         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20884                 case "$cf_add_cflags" in
20885                 (-D*)
20886                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20887
20888                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20889                                 && test -z "${cf_tst_cflags}" \
20890                                 && cf_fix_cppflags=yes
20891
20892                         if test "$cf_fix_cppflags" = yes ; then
20893
20894         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20895         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20896
20897                                 continue
20898                         elif test "${cf_tst_cflags}" = "\"'" ; then
20899
20900         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20901         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20902
20903                                 continue
20904                         fi
20905                         ;;
20906                 esac
20907                 case "$CPPFLAGS" in
20908                 (*$cf_add_cflags)
20909                         ;;
20910                 (*)
20911                         case "$cf_add_cflags" in
20912                         (-D*)
20913                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20914
20915 CPPFLAGS=`echo "$CPPFLAGS" | \
20916         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20917                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20918
20919                                 ;;
20920                         esac
20921
20922         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20923         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20924
20925                         ;;
20926                 esac
20927                 ;;
20928         (*)
20929
20930         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20931         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20932
20933                 ;;
20934         esac
20935         ;;
20936 (yes)
20937
20938         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20939         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20940
20941         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20942
20943         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20944                 && test -z "${cf_tst_cflags}" \
20945                 && cf_fix_cppflags=no
20946         ;;
20947 esac
20948 done
20949
20950 if test -n "$cf_new_cflags" ; then
20951
20952         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20953         CFLAGS="${CFLAGS}$cf_new_cflags"
20954
20955 fi
20956
20957 if test -n "$cf_new_cppflags" ; then
20958
20959         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20960         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20961
20962 fi
20963
20964 if test -n "$cf_new_extra_cppflags" ; then
20965
20966         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20967         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20968
20969 fi
20970
20971 cf_add_libs="$LIBS"
20972 # reverse order
20973 cf_add_0lib=
20974 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20975 # filter duplicates
20976 for cf_add_1lib in $cf_add_0lib; do
20977         for cf_add_2lib in $cf_add_libs; do
20978                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20979                         cf_add_1lib=
20980                         break
20981                 fi
20982         done
20983         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20984 done
20985 LIBS="$cf_add_libs"
20986
20987         :
20988 else
20989         cf_pkgconfig_incs=
20990         cf_pkgconfig_libs=
20991         { echo "$as_me:20991: WARNING: unable to find Xt library" >&5
20992 echo "$as_me: WARNING: unable to find Xt library" >&2;}
20993 fi
20994
20995 else
20996         LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
20997 fi
20998
20999 cf_have_X_LIBS=no
21000
21001 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
21002         test -n "$verbose" && echo "    found package xt" 1>&6
21003
21004 echo "${as_me:-configure}:21004: testing found package xt ..." 1>&5
21005
21006         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
21007         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
21008         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
21009
21010 echo "${as_me:-configure}:21010: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21011
21012         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
21013
21014 echo "${as_me:-configure}:21014: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
21015
21016 cf_fix_cppflags=no
21017 cf_new_cflags=
21018 cf_new_cppflags=
21019 cf_new_extra_cppflags=
21020
21021 for cf_add_cflags in $cf_pkgconfig_incs
21022 do
21023 case "$cf_fix_cppflags" in
21024 (no)
21025         case "$cf_add_cflags" in
21026         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21027                 case "$cf_add_cflags" in
21028                 (-D*)
21029                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21030
21031                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21032                                 && test -z "${cf_tst_cflags}" \
21033                                 && cf_fix_cppflags=yes
21034
21035                         if test "$cf_fix_cppflags" = yes ; then
21036
21037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21039
21040                                 continue
21041                         elif test "${cf_tst_cflags}" = "\"'" ; then
21042
21043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21045
21046                                 continue
21047                         fi
21048                         ;;
21049                 esac
21050                 case "$CPPFLAGS" in
21051                 (*$cf_add_cflags)
21052                         ;;
21053                 (*)
21054                         case "$cf_add_cflags" in
21055                         (-D*)
21056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21057
21058 CPPFLAGS=`echo "$CPPFLAGS" | \
21059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21061
21062                                 ;;
21063                         esac
21064
21065         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21066         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21067
21068                         ;;
21069                 esac
21070                 ;;
21071         (*)
21072
21073         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21074         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21075
21076                 ;;
21077         esac
21078         ;;
21079 (yes)
21080
21081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21083
21084         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21085
21086         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21087                 && test -z "${cf_tst_cflags}" \
21088                 && cf_fix_cppflags=no
21089         ;;
21090 esac
21091 done
21092
21093 if test -n "$cf_new_cflags" ; then
21094
21095         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21096         CFLAGS="${CFLAGS}$cf_new_cflags"
21097
21098 fi
21099
21100 if test -n "$cf_new_cppflags" ; then
21101
21102         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21103         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21104
21105 fi
21106
21107 if test -n "$cf_new_extra_cppflags" ; then
21108
21109         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21110         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21111
21112 fi
21113
21114 cf_add_libs="$LIBS"
21115 # reverse order
21116 cf_add_0lib=
21117 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21118 # filter duplicates
21119 for cf_add_1lib in $cf_add_0lib; do
21120         for cf_add_2lib in $cf_add_libs; do
21121                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21122                         cf_add_1lib=
21123                         break
21124                 fi
21125         done
21126         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21127 done
21128 LIBS="$cf_add_libs"
21129
21130         case "x$LIBS" in
21131         (*-lX11*)
21132                 ;;
21133         (*)
21134 # we have an "xt" package, but it may omit Xt's dependency on X11
21135 echo "$as_me:21135: checking for usable X dependency" >&5
21136 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
21137 if test "${cf_cv_xt_x11_compat+set}" = set; then
21138   echo $ECHO_N "(cached) $ECHO_C" >&6
21139 else
21140
21141 cat >"conftest.$ac_ext" <<_ACEOF
21142 #line 21142 "configure"
21143 #include "confdefs.h"
21144
21145 #include <X11/Xlib.h>
21146
21147 int
21148 main (void)
21149 {
21150
21151         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
21152         int rc2 = XClearWindow((Display*) 0, (Window) 0);
21153         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
21154         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
21155
21156   ;
21157   return 0;
21158 }
21159 _ACEOF
21160 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21161 if { (eval echo "$as_me:21161: \"$ac_link\"") >&5
21162   (eval $ac_link) 2>&5
21163   ac_status=$?
21164   echo "$as_me:21164: \$? = $ac_status" >&5
21165   (exit "$ac_status"); } &&
21166          { ac_try='test -s "conftest$ac_exeext"'
21167   { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168   (eval $ac_try) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit "$ac_status"); }; }; then
21172   cf_cv_xt_x11_compat=yes
21173 else
21174   echo "$as_me: failed program was:" >&5
21175 cat "conftest.$ac_ext" >&5
21176 cf_cv_xt_x11_compat=no
21177 fi
21178 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21179 fi
21180 echo "$as_me:21180: result: $cf_cv_xt_x11_compat" >&5
21181 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
21182                 if test "$cf_cv_xt_x11_compat" = no
21183                 then
21184                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
21185
21186 echo "${as_me:-configure}:21186: testing work around broken X11 dependency ..." 1>&5
21187
21188                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
21189
21190 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
21191         test -n "$verbose" && echo "    found package x11" 1>&6
21192
21193 echo "${as_me:-configure}:21193: testing found package x11 ..." 1>&5
21194
21195         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
21196         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
21197         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
21198
21199 echo "${as_me:-configure}:21199: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21200
21201         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
21202
21203 echo "${as_me:-configure}:21203: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
21204
21205 cf_fix_cppflags=no
21206 cf_new_cflags=
21207 cf_new_cppflags=
21208 cf_new_extra_cppflags=
21209
21210 for cf_add_cflags in $cf_pkgconfig_incs
21211 do
21212 case "$cf_fix_cppflags" in
21213 (no)
21214         case "$cf_add_cflags" in
21215         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21216                 case "$cf_add_cflags" in
21217                 (-D*)
21218                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21219
21220                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21221                                 && test -z "${cf_tst_cflags}" \
21222                                 && cf_fix_cppflags=yes
21223
21224                         if test "$cf_fix_cppflags" = yes ; then
21225
21226         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21227         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21228
21229                                 continue
21230                         elif test "${cf_tst_cflags}" = "\"'" ; then
21231
21232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21234
21235                                 continue
21236                         fi
21237                         ;;
21238                 esac
21239                 case "$CPPFLAGS" in
21240                 (*$cf_add_cflags)
21241                         ;;
21242                 (*)
21243                         case "$cf_add_cflags" in
21244                         (-D*)
21245                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21246
21247 CPPFLAGS=`echo "$CPPFLAGS" | \
21248         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21249                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21250
21251                                 ;;
21252                         esac
21253
21254         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21255         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21256
21257                         ;;
21258                 esac
21259                 ;;
21260         (*)
21261
21262         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21263         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21264
21265                 ;;
21266         esac
21267         ;;
21268 (yes)
21269
21270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21272
21273         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21274
21275         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21276                 && test -z "${cf_tst_cflags}" \
21277                 && cf_fix_cppflags=no
21278         ;;
21279 esac
21280 done
21281
21282 if test -n "$cf_new_cflags" ; then
21283
21284         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21285         CFLAGS="${CFLAGS}$cf_new_cflags"
21286
21287 fi
21288
21289 if test -n "$cf_new_cppflags" ; then
21290
21291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21292         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21293
21294 fi
21295
21296 if test -n "$cf_new_extra_cppflags" ; then
21297
21298         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21299         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21300
21301 fi
21302
21303 cf_add_libs="$LIBS"
21304 # reverse order
21305 cf_add_0lib=
21306 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21307 # filter duplicates
21308 for cf_add_1lib in $cf_add_0lib; do
21309         for cf_add_2lib in $cf_add_libs; do
21310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21311                         cf_add_1lib=
21312                         break
21313                 fi
21314         done
21315         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21316 done
21317 LIBS="$cf_add_libs"
21318
21319         :
21320 else
21321         cf_pkgconfig_incs=
21322         cf_pkgconfig_libs=
21323
21324 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
21325
21326 echo "${as_me:-configure}:21326: testing ...before $LIBS ..." 1>&5
21327
21328 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
21329 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
21330
21331 echo "${as_me:-configure}:21331: testing ...after  $LIBS ..." 1>&5
21332
21333 fi
21334
21335                 fi
21336                 ;;
21337         esac
21338
21339 echo "$as_me:21339: checking for usable X Toolkit package" >&5
21340 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
21341 if test "${cf_cv_xt_ice_compat+set}" = set; then
21342   echo $ECHO_N "(cached) $ECHO_C" >&6
21343 else
21344
21345 cat >"conftest.$ac_ext" <<_ACEOF
21346 #line 21346 "configure"
21347 #include "confdefs.h"
21348
21349 #include <X11/Shell.h>
21350
21351 int
21352 main (void)
21353 {
21354 int num = IceConnectionNumber(0); (void) num
21355
21356   ;
21357   return 0;
21358 }
21359 _ACEOF
21360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21361 if { (eval echo "$as_me:21361: \"$ac_link\"") >&5
21362   (eval $ac_link) 2>&5
21363   ac_status=$?
21364   echo "$as_me:21364: \$? = $ac_status" >&5
21365   (exit "$ac_status"); } &&
21366          { ac_try='test -s "conftest$ac_exeext"'
21367   { (eval echo "$as_me:21367: \"$ac_try\"") >&5
21368   (eval $ac_try) 2>&5
21369   ac_status=$?
21370   echo "$as_me:21370: \$? = $ac_status" >&5
21371   (exit "$ac_status"); }; }; then
21372   cf_cv_xt_ice_compat=yes
21373 else
21374   echo "$as_me: failed program was:" >&5
21375 cat "conftest.$ac_ext" >&5
21376 cf_cv_xt_ice_compat=no
21377 fi
21378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21379 fi
21380 echo "$as_me:21380: result: $cf_cv_xt_ice_compat" >&5
21381 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
21382
21383         if test "$cf_cv_xt_ice_compat" = no
21384         then
21385                 # workaround for broken ".pc" files used for X Toolkit.
21386                 case "x$X_PRE_LIBS" in
21387                 (*-lICE*)
21388                         case "x$LIBS" in
21389                         (*-lICE*)
21390                                 ;;
21391                         (*)
21392                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
21393
21394 echo "${as_me:-configure}:21394: testing work around broken ICE dependency ..." 1>&5
21395
21396 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
21397         test -n "$verbose" && echo "    found package ice" 1>&6
21398
21399 echo "${as_me:-configure}:21399: testing found package ice ..." 1>&5
21400
21401         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
21402         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
21403         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
21404
21405 echo "${as_me:-configure}:21405: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21406
21407         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
21408
21409 echo "${as_me:-configure}:21409: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
21410
21411 cf_fix_cppflags=no
21412 cf_new_cflags=
21413 cf_new_cppflags=
21414 cf_new_extra_cppflags=
21415
21416 for cf_add_cflags in $cf_pkgconfig_incs
21417 do
21418 case "$cf_fix_cppflags" in
21419 (no)
21420         case "$cf_add_cflags" in
21421         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21422                 case "$cf_add_cflags" in
21423                 (-D*)
21424                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21425
21426                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21427                                 && test -z "${cf_tst_cflags}" \
21428                                 && cf_fix_cppflags=yes
21429
21430                         if test "$cf_fix_cppflags" = yes ; then
21431
21432         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21433         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21434
21435                                 continue
21436                         elif test "${cf_tst_cflags}" = "\"'" ; then
21437
21438         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21439         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21440
21441                                 continue
21442                         fi
21443                         ;;
21444                 esac
21445                 case "$CPPFLAGS" in
21446                 (*$cf_add_cflags)
21447                         ;;
21448                 (*)
21449                         case "$cf_add_cflags" in
21450                         (-D*)
21451                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21452
21453 CPPFLAGS=`echo "$CPPFLAGS" | \
21454         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21455                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21456
21457                                 ;;
21458                         esac
21459
21460         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21461         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21462
21463                         ;;
21464                 esac
21465                 ;;
21466         (*)
21467
21468         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21469         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21470
21471                 ;;
21472         esac
21473         ;;
21474 (yes)
21475
21476         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21477         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21478
21479         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21480
21481         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21482                 && test -z "${cf_tst_cflags}" \
21483                 && cf_fix_cppflags=no
21484         ;;
21485 esac
21486 done
21487
21488 if test -n "$cf_new_cflags" ; then
21489
21490         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21491         CFLAGS="${CFLAGS}$cf_new_cflags"
21492
21493 fi
21494
21495 if test -n "$cf_new_cppflags" ; then
21496
21497         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21498         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21499
21500 fi
21501
21502 if test -n "$cf_new_extra_cppflags" ; then
21503
21504         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21505         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21506
21507 fi
21508
21509 cf_add_libs="$LIBS"
21510 # reverse order
21511 cf_add_0lib=
21512 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21513 # filter duplicates
21514 for cf_add_1lib in $cf_add_0lib; do
21515         for cf_add_2lib in $cf_add_libs; do
21516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21517                         cf_add_1lib=
21518                         break
21519                 fi
21520         done
21521         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21522 done
21523 LIBS="$cf_add_libs"
21524
21525 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
21526         test -n "$verbose" && echo "    found package sm" 1>&6
21527
21528 echo "${as_me:-configure}:21528: testing found package sm ..." 1>&5
21529
21530         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
21531         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
21532         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
21533
21534 echo "${as_me:-configure}:21534: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21535
21536         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
21537
21538 echo "${as_me:-configure}:21538: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
21539
21540 cf_fix_cppflags=no
21541 cf_new_cflags=
21542 cf_new_cppflags=
21543 cf_new_extra_cppflags=
21544
21545 for cf_add_cflags in $cf_pkgconfig_incs
21546 do
21547 case "$cf_fix_cppflags" in
21548 (no)
21549         case "$cf_add_cflags" in
21550         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21551                 case "$cf_add_cflags" in
21552                 (-D*)
21553                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21554
21555                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21556                                 && test -z "${cf_tst_cflags}" \
21557                                 && cf_fix_cppflags=yes
21558
21559                         if test "$cf_fix_cppflags" = yes ; then
21560
21561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21563
21564                                 continue
21565                         elif test "${cf_tst_cflags}" = "\"'" ; then
21566
21567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21569
21570                                 continue
21571                         fi
21572                         ;;
21573                 esac
21574                 case "$CPPFLAGS" in
21575                 (*$cf_add_cflags)
21576                         ;;
21577                 (*)
21578                         case "$cf_add_cflags" in
21579                         (-D*)
21580                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21581
21582 CPPFLAGS=`echo "$CPPFLAGS" | \
21583         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21584                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21585
21586                                 ;;
21587                         esac
21588
21589         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21590         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21591
21592                         ;;
21593                 esac
21594                 ;;
21595         (*)
21596
21597         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21598         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21599
21600                 ;;
21601         esac
21602         ;;
21603 (yes)
21604
21605         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21606         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21607
21608         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21609
21610         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21611                 && test -z "${cf_tst_cflags}" \
21612                 && cf_fix_cppflags=no
21613         ;;
21614 esac
21615 done
21616
21617 if test -n "$cf_new_cflags" ; then
21618
21619         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21620         CFLAGS="${CFLAGS}$cf_new_cflags"
21621
21622 fi
21623
21624 if test -n "$cf_new_cppflags" ; then
21625
21626         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21627         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21628
21629 fi
21630
21631 if test -n "$cf_new_extra_cppflags" ; then
21632
21633         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21634         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21635
21636 fi
21637
21638 cf_add_libs="$LIBS"
21639 # reverse order
21640 cf_add_0lib=
21641 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21642 # filter duplicates
21643 for cf_add_1lib in $cf_add_0lib; do
21644         for cf_add_2lib in $cf_add_libs; do
21645                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21646                         cf_add_1lib=
21647                         break
21648                 fi
21649         done
21650         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21651 done
21652 LIBS="$cf_add_libs"
21653
21654         :
21655 else
21656         cf_pkgconfig_incs=
21657         cf_pkgconfig_libs=
21658         :
21659 fi
21660
21661 else
21662         cf_pkgconfig_incs=
21663         cf_pkgconfig_libs=
21664
21665 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
21666
21667 echo "${as_me:-configure}:21667: testing ...before $LIBS ..." 1>&5
21668
21669 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
21670 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
21671
21672 echo "${as_me:-configure}:21672: testing ...after  $LIBS ..." 1>&5
21673
21674 fi
21675
21676                                 ;;
21677                         esac
21678                         ;;
21679                 esac
21680         fi
21681
21682         cf_have_X_LIBS=yes
21683
21684 else
21685         cf_pkgconfig_incs=
21686         cf_pkgconfig_libs=
21687
21688         LDFLAGS="$X_LIBS $LDFLAGS"
21689
21690 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
21691
21692 echo "${as_me:-configure}:21692: testing checking additions to CFLAGS ..." 1>&5
21693
21694 cf_check_cflags="$CFLAGS"
21695 cf_check_cppflags="$CPPFLAGS"
21696
21697 cf_fix_cppflags=no
21698 cf_new_cflags=
21699 cf_new_cppflags=
21700 cf_new_extra_cppflags=
21701
21702 for cf_add_cflags in $X_CFLAGS
21703 do
21704 case "$cf_fix_cppflags" in
21705 (no)
21706         case "$cf_add_cflags" in
21707         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21708                 case "$cf_add_cflags" in
21709                 (-D*)
21710                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21711
21712                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21713                                 && test -z "${cf_tst_cflags}" \
21714                                 && cf_fix_cppflags=yes
21715
21716                         if test "$cf_fix_cppflags" = yes ; then
21717
21718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21720
21721                                 continue
21722                         elif test "${cf_tst_cflags}" = "\"'" ; then
21723
21724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21726
21727                                 continue
21728                         fi
21729                         ;;
21730                 esac
21731                 case "$CPPFLAGS" in
21732                 (*$cf_add_cflags)
21733                         ;;
21734                 (*)
21735                         case "$cf_add_cflags" in
21736                         (-D*)
21737                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21738
21739 CPPFLAGS=`echo "$CPPFLAGS" | \
21740         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21741                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21742
21743                                 ;;
21744                         esac
21745
21746         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21747         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21748
21749                         ;;
21750                 esac
21751                 ;;
21752         (*)
21753
21754         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21755         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21756
21757                 ;;
21758         esac
21759         ;;
21760 (yes)
21761
21762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21764
21765         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21766
21767         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21768                 && test -z "${cf_tst_cflags}" \
21769                 && cf_fix_cppflags=no
21770         ;;
21771 esac
21772 done
21773
21774 if test -n "$cf_new_cflags" ; then
21775         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
21776
21777 echo "${as_me:-configure}:21777: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
21778
21779         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21780         CFLAGS="${CFLAGS}$cf_new_cflags"
21781
21782 fi
21783
21784 if test -n "$cf_new_cppflags" ; then
21785         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
21786
21787 echo "${as_me:-configure}:21787: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
21788
21789         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21790         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21791
21792 fi
21793
21794 if test -n "$cf_new_extra_cppflags" ; then
21795         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
21796
21797 echo "${as_me:-configure}:21797: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
21798
21799         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21800         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21801
21802 fi
21803
21804 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
21805 cat >"conftest.$ac_ext" <<_ACEOF
21806 #line 21806 "configure"
21807 #include "confdefs.h"
21808 #include <stdio.h>
21809 int
21810 main (void)
21811 {
21812 printf("Hello world");
21813   ;
21814   return 0;
21815 }
21816 _ACEOF
21817 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21818 if { (eval echo "$as_me:21818: \"$ac_link\"") >&5
21819   (eval $ac_link) 2>&5
21820   ac_status=$?
21821   echo "$as_me:21821: \$? = $ac_status" >&5
21822   (exit "$ac_status"); } &&
21823          { ac_try='test -s "conftest$ac_exeext"'
21824   { (eval echo "$as_me:21824: \"$ac_try\"") >&5
21825   (eval $ac_try) 2>&5
21826   ac_status=$?
21827   echo "$as_me:21827: \$? = $ac_status" >&5
21828   (exit "$ac_status"); }; }; then
21829   :
21830 else
21831   echo "$as_me: failed program was:" >&5
21832 cat "conftest.$ac_ext" >&5
21833 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
21834
21835 echo "${as_me:-configure}:21835: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
21836
21837          if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
21838                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
21839
21840 echo "${as_me:-configure}:21840: testing but keeping change to \$CPPFLAGS ..." 1>&5
21841
21842          fi
21843          CFLAGS="$cf_check_cflags"
21844 fi
21845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21846 fi
21847
21848         echo "$as_me:21848: checking for XOpenDisplay" >&5
21849 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
21850 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
21851   echo $ECHO_N "(cached) $ECHO_C" >&6
21852 else
21853   cat >"conftest.$ac_ext" <<_ACEOF
21854 #line 21854 "configure"
21855 #include "confdefs.h"
21856 #define XOpenDisplay autoconf_temporary
21857 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21858 #undef XOpenDisplay
21859
21860 #ifdef __cplusplus
21861 extern "C"
21862 #endif
21863
21864 /* We use char because int might match the return type of a gcc2
21865    builtin and then its argument prototype would still apply.  */
21866 char XOpenDisplay (void);
21867
21868 int
21869 main (void)
21870 {
21871
21872 /* The GNU C library defines stubs for functions which it implements
21873     to always fail with ENOSYS.  Some functions are actually named
21874     something starting with __ and the normal name is an alias.  */
21875 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
21876 #error found stub for XOpenDisplay
21877 #endif
21878
21879         return XOpenDisplay ();
21880   ;
21881   return 0;
21882 }
21883 _ACEOF
21884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21885 if { (eval echo "$as_me:21885: \"$ac_link\"") >&5
21886   (eval $ac_link) 2>&5
21887   ac_status=$?
21888   echo "$as_me:21888: \$? = $ac_status" >&5
21889   (exit "$ac_status"); } &&
21890          { ac_try='test -s "conftest$ac_exeext"'
21891   { (eval echo "$as_me:21891: \"$ac_try\"") >&5
21892   (eval $ac_try) 2>&5
21893   ac_status=$?
21894   echo "$as_me:21894: \$? = $ac_status" >&5
21895   (exit "$ac_status"); }; }; then
21896   ac_cv_func_XOpenDisplay=yes
21897 else
21898   echo "$as_me: failed program was:" >&5
21899 cat "conftest.$ac_ext" >&5
21900 ac_cv_func_XOpenDisplay=no
21901 fi
21902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21903 fi
21904 echo "$as_me:21904: result: $ac_cv_func_XOpenDisplay" >&5
21905 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
21906 if test "$ac_cv_func_XOpenDisplay" = yes; then
21907   :
21908 else
21909
21910         echo "$as_me:21910: checking for XOpenDisplay in -lX11" >&5
21911 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
21912 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
21913   echo $ECHO_N "(cached) $ECHO_C" >&6
21914 else
21915   ac_check_lib_save_LIBS=$LIBS
21916 LIBS="-lX11  $LIBS"
21917 cat >"conftest.$ac_ext" <<_ACEOF
21918 #line 21918 "configure"
21919 #include "confdefs.h"
21920
21921 /* Override any gcc2 internal prototype to avoid an error.  */
21922 #ifdef __cplusplus
21923 extern "C"
21924 #endif
21925 /* We use char because int might match the return type of a gcc2
21926    builtin and then its argument prototype would still apply.  */
21927 char XOpenDisplay ();
21928 int
21929 main (void)
21930 {
21931 XOpenDisplay ();
21932   ;
21933   return 0;
21934 }
21935 _ACEOF
21936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21937 if { (eval echo "$as_me:21937: \"$ac_link\"") >&5
21938   (eval $ac_link) 2>&5
21939   ac_status=$?
21940   echo "$as_me:21940: \$? = $ac_status" >&5
21941   (exit "$ac_status"); } &&
21942          { ac_try='test -s "conftest$ac_exeext"'
21943   { (eval echo "$as_me:21943: \"$ac_try\"") >&5
21944   (eval $ac_try) 2>&5
21945   ac_status=$?
21946   echo "$as_me:21946: \$? = $ac_status" >&5
21947   (exit "$ac_status"); }; }; then
21948   ac_cv_lib_X11_XOpenDisplay=yes
21949 else
21950   echo "$as_me: failed program was:" >&5
21951 cat "conftest.$ac_ext" >&5
21952 ac_cv_lib_X11_XOpenDisplay=no
21953 fi
21954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21955 LIBS=$ac_check_lib_save_LIBS
21956 fi
21957 echo "$as_me:21957: result: $ac_cv_lib_X11_XOpenDisplay" >&5
21958 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
21959 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
21960
21961 cf_add_libs="$LIBS"
21962 # reverse order
21963 cf_add_0lib=
21964 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21965 # filter duplicates
21966 for cf_add_1lib in $cf_add_0lib; do
21967         for cf_add_2lib in $cf_add_libs; do
21968                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21969                         cf_add_1lib=
21970                         break
21971                 fi
21972         done
21973         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21974 done
21975 LIBS="$cf_add_libs"
21976
21977 fi
21978
21979 fi
21980
21981         echo "$as_me:21981: checking for XtAppInitialize" >&5
21982 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
21983 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
21984   echo $ECHO_N "(cached) $ECHO_C" >&6
21985 else
21986   cat >"conftest.$ac_ext" <<_ACEOF
21987 #line 21987 "configure"
21988 #include "confdefs.h"
21989 #define XtAppInitialize autoconf_temporary
21990 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21991 #undef XtAppInitialize
21992
21993 #ifdef __cplusplus
21994 extern "C"
21995 #endif
21996
21997 /* We use char because int might match the return type of a gcc2
21998    builtin and then its argument prototype would still apply.  */
21999 char XtAppInitialize (void);
22000
22001 int
22002 main (void)
22003 {
22004
22005 /* The GNU C library defines stubs for functions which it implements
22006     to always fail with ENOSYS.  Some functions are actually named
22007     something starting with __ and the normal name is an alias.  */
22008 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
22009 #error found stub for XtAppInitialize
22010 #endif
22011
22012         return XtAppInitialize ();
22013   ;
22014   return 0;
22015 }
22016 _ACEOF
22017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22018 if { (eval echo "$as_me:22018: \"$ac_link\"") >&5
22019   (eval $ac_link) 2>&5
22020   ac_status=$?
22021   echo "$as_me:22021: \$? = $ac_status" >&5
22022   (exit "$ac_status"); } &&
22023          { ac_try='test -s "conftest$ac_exeext"'
22024   { (eval echo "$as_me:22024: \"$ac_try\"") >&5
22025   (eval $ac_try) 2>&5
22026   ac_status=$?
22027   echo "$as_me:22027: \$? = $ac_status" >&5
22028   (exit "$ac_status"); }; }; then
22029   ac_cv_func_XtAppInitialize=yes
22030 else
22031   echo "$as_me: failed program was:" >&5
22032 cat "conftest.$ac_ext" >&5
22033 ac_cv_func_XtAppInitialize=no
22034 fi
22035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22036 fi
22037 echo "$as_me:22037: result: $ac_cv_func_XtAppInitialize" >&5
22038 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
22039 if test "$ac_cv_func_XtAppInitialize" = yes; then
22040   :
22041 else
22042
22043         echo "$as_me:22043: checking for XtAppInitialize in -lXt" >&5
22044 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
22045 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
22046   echo $ECHO_N "(cached) $ECHO_C" >&6
22047 else
22048   ac_check_lib_save_LIBS=$LIBS
22049 LIBS="-lXt  $LIBS"
22050 cat >"conftest.$ac_ext" <<_ACEOF
22051 #line 22051 "configure"
22052 #include "confdefs.h"
22053
22054 /* Override any gcc2 internal prototype to avoid an error.  */
22055 #ifdef __cplusplus
22056 extern "C"
22057 #endif
22058 /* We use char because int might match the return type of a gcc2
22059    builtin and then its argument prototype would still apply.  */
22060 char XtAppInitialize ();
22061 int
22062 main (void)
22063 {
22064 XtAppInitialize ();
22065   ;
22066   return 0;
22067 }
22068 _ACEOF
22069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22070 if { (eval echo "$as_me:22070: \"$ac_link\"") >&5
22071   (eval $ac_link) 2>&5
22072   ac_status=$?
22073   echo "$as_me:22073: \$? = $ac_status" >&5
22074   (exit "$ac_status"); } &&
22075          { ac_try='test -s "conftest$ac_exeext"'
22076   { (eval echo "$as_me:22076: \"$ac_try\"") >&5
22077   (eval $ac_try) 2>&5
22078   ac_status=$?
22079   echo "$as_me:22079: \$? = $ac_status" >&5
22080   (exit "$ac_status"); }; }; then
22081   ac_cv_lib_Xt_XtAppInitialize=yes
22082 else
22083   echo "$as_me: failed program was:" >&5
22084 cat "conftest.$ac_ext" >&5
22085 ac_cv_lib_Xt_XtAppInitialize=no
22086 fi
22087 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22088 LIBS=$ac_check_lib_save_LIBS
22089 fi
22090 echo "$as_me:22090: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
22091 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
22092 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
22093
22094 cat >>confdefs.h <<\EOF
22095 #define HAVE_LIBXT 1
22096 EOF
22097
22098                  cf_have_X_LIBS=Xt
22099                  LIBS="-lXt $LIBS"
22100 fi
22101
22102 fi
22103
22104 fi
22105
22106 if test "$cf_have_X_LIBS" = no ; then
22107         { echo "$as_me:22107: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22108 test program.  You will have to check and add the proper libraries by hand
22109 to makefile." >&5
22110 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22111 test program.  You will have to check and add the proper libraries by hand
22112 to makefile." >&2;}
22113 fi
22114
22115 cf_x_athena_root=$cf_x_athena
22116 cf_x_athena_inc=""
22117
22118 for cf_path in default \
22119         /usr/contrib/X11R6 \
22120         /usr/contrib/X11R5 \
22121         /usr/lib/X11R5 \
22122         /usr/local
22123 do
22124         if test -z "$cf_x_athena_inc" ; then
22125
22126 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
22127 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
22128 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
22129 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22130 for cf_X_CFLAGS in $X_CFLAGS
22131 do
22132         case "x$cf_X_CFLAGS" in
22133         x-[IUD]*)
22134                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22135                 ;;
22136         *)
22137                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22138                 ;;
22139         esac
22140 done
22141
22142                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
22143                 if test "$cf_path" != default ; then
22144
22145         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22146         CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
22147
22148                         echo "$as_me:22148: checking for $cf_test in $cf_path" >&5
22149 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
22150                 else
22151                         echo "$as_me:22151: checking for $cf_test" >&5
22152 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
22153                 fi
22154                 cat >"conftest.$ac_ext" <<_ACEOF
22155 #line 22155 "configure"
22156 #include "confdefs.h"
22157
22158 #include <X11/Intrinsic.h>
22159 #include <$cf_test>
22160 int
22161 main (void)
22162 {
22163
22164   ;
22165   return 0;
22166 }
22167 _ACEOF
22168 rm -f "conftest.$ac_objext"
22169 if { (eval echo "$as_me:22169: \"$ac_compile\"") >&5
22170   (eval $ac_compile) 2>&5
22171   ac_status=$?
22172   echo "$as_me:22172: \$? = $ac_status" >&5
22173   (exit "$ac_status"); } &&
22174          { ac_try='test -s "conftest.$ac_objext"'
22175   { (eval echo "$as_me:22175: \"$ac_try\"") >&5
22176   (eval $ac_try) 2>&5
22177   ac_status=$?
22178   echo "$as_me:22178: \$? = $ac_status" >&5
22179   (exit "$ac_status"); }; }; then
22180   cf_result=yes
22181 else
22182   echo "$as_me: failed program was:" >&5
22183 cat "conftest.$ac_ext" >&5
22184 cf_result=no
22185 fi
22186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22187                 echo "$as_me:22187: result: $cf_result" >&5
22188 echo "${ECHO_T}$cf_result" >&6
22189
22190 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
22191 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
22192 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
22193
22194                 if test "$cf_result" = yes ; then
22195                         test "$cf_path"  = default && cf_x_athena_inc=default
22196                         test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
22197                         break
22198                 fi
22199         fi
22200 done
22201
22202 if test -z "$cf_x_athena_inc" ; then
22203         { echo "$as_me:22203: WARNING: Unable to find Athena header files" >&5
22204 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
22205 elif test "$cf_x_athena_inc" != default ; then
22206
22207         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22208         CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
22209
22210 fi
22211
22212 cf_x_athena_root=$cf_x_athena
22213 cf_x_athena_lib=""
22214
22215 for cf_path in default \
22216         /usr/contrib/X11R6 \
22217         /usr/contrib/X11R5 \
22218         /usr/lib/X11R5 \
22219         /usr/local
22220 do
22221         for cf_lib in \
22222                 ${cf_x_athena_root} \
22223                 ${cf_x_athena_root}7 \
22224                 ${cf_x_athena_root}6
22225         do
22226         for cf_libs in \
22227                 "-l$cf_lib -lXmu" \
22228                 "-l$cf_lib -lXpm -lXmu" \
22229                 "-l${cf_lib}_s -lXmu_s"
22230         do
22231                 test -n "$cf_x_athena_lib" && break
22232
22233 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
22234 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
22235 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
22236 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22237 for cf_X_CFLAGS in $X_CFLAGS
22238 do
22239         case "x$cf_X_CFLAGS" in
22240         x-[IUD]*)
22241                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22242                 ;;
22243         *)
22244                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22245                 ;;
22246         esac
22247 done
22248
22249                 cf_test=XawSimpleMenuAddGlobalActions
22250                 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
22251
22252 cf_add_libs="$LIBS"
22253 # reverse order
22254 cf_add_0lib=
22255 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22256 # filter duplicates
22257 for cf_add_1lib in $cf_add_0lib; do
22258         for cf_add_2lib in $cf_add_libs; do
22259                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22260                         cf_add_1lib=
22261                         break
22262                 fi
22263         done
22264         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22265 done
22266 LIBS="$cf_add_libs"
22267
22268                 echo "$as_me:22268: checking for $cf_test in $cf_libs" >&5
22269 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
22270                 cat >"conftest.$ac_ext" <<_ACEOF
22271 #line 22271 "configure"
22272 #include "confdefs.h"
22273
22274 #include <X11/Intrinsic.h>
22275 #include <X11/$cf_x_athena_root/SimpleMenu.h>
22276
22277 int
22278 main (void)
22279 {
22280
22281 $cf_test((XtAppContext) 0)
22282   ;
22283   return 0;
22284 }
22285 _ACEOF
22286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22287 if { (eval echo "$as_me:22287: \"$ac_link\"") >&5
22288   (eval $ac_link) 2>&5
22289   ac_status=$?
22290   echo "$as_me:22290: \$? = $ac_status" >&5
22291   (exit "$ac_status"); } &&
22292          { ac_try='test -s "conftest$ac_exeext"'
22293   { (eval echo "$as_me:22293: \"$ac_try\"") >&5
22294   (eval $ac_try) 2>&5
22295   ac_status=$?
22296   echo "$as_me:22296: \$? = $ac_status" >&5
22297   (exit "$ac_status"); }; }; then
22298   cf_result=yes
22299 else
22300   echo "$as_me: failed program was:" >&5
22301 cat "conftest.$ac_ext" >&5
22302 cf_result=no
22303 fi
22304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22305                 echo "$as_me:22305: result: $cf_result" >&5
22306 echo "${ECHO_T}$cf_result" >&6
22307
22308 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
22309 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
22310 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
22311
22312                 if test "$cf_result" = yes ; then
22313                         cf_x_athena_lib="$cf_libs"
22314                         break
22315                 fi
22316         done # cf_libs
22317                 test -n "$cf_x_athena_lib" && break
22318         done # cf_lib
22319 done
22320
22321 if test -z "$cf_x_athena_lib" ; then
22322         { { echo "$as_me:22322: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
22323 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
22324    { (exit 1); exit 1; }; }
22325 fi
22326
22327 cf_add_libs="$LIBS"
22328 # reverse order
22329 cf_add_0lib=
22330 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22331 # filter duplicates
22332 for cf_add_1lib in $cf_add_0lib; do
22333         for cf_add_2lib in $cf_add_libs; do
22334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22335                         cf_add_1lib=
22336                         break
22337                 fi
22338         done
22339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22340 done
22341 LIBS="$cf_add_libs"
22342
22343 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22344
22345 cat >>confdefs.h <<EOF
22346 #define $cf_x_athena_LIBS 1
22347 EOF
22348
22349 fi
22350
22351 if test -n "$ac_tool_prefix"; then
22352   for ac_prog in xcurses-config
22353   do
22354     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22355 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22356 echo "$as_me:22356: checking for $ac_word" >&5
22357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22358 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
22359   echo $ECHO_N "(cached) $ECHO_C" >&6
22360 else
22361   if test -n "$XCURSES_CONFIG"; then
22362   ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
22363 else
22364   ac_save_IFS=$IFS; IFS=$ac_path_separator
22365 ac_dummy="$PATH"
22366 for ac_dir in $ac_dummy; do
22367   IFS=$ac_save_IFS
22368   test -z "$ac_dir" && ac_dir=.
22369   $as_executable_p "$ac_dir/$ac_word" || continue
22370 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
22371 echo "$as_me:22371: found $ac_dir/$ac_word" >&5
22372 break
22373 done
22374
22375 fi
22376 fi
22377 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
22378 if test -n "$XCURSES_CONFIG"; then
22379   echo "$as_me:22379: result: $XCURSES_CONFIG" >&5
22380 echo "${ECHO_T}$XCURSES_CONFIG" >&6
22381 else
22382   echo "$as_me:22382: result: no" >&5
22383 echo "${ECHO_T}no" >&6
22384 fi
22385
22386     test -n "$XCURSES_CONFIG" && break
22387   done
22388 fi
22389 if test -z "$XCURSES_CONFIG"; then
22390   ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
22391   for ac_prog in xcurses-config
22392 do
22393   # Extract the first word of "$ac_prog", so it can be a program name with args.
22394 set dummy $ac_prog; ac_word=$2
22395 echo "$as_me:22395: checking for $ac_word" >&5
22396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22397 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
22398   echo $ECHO_N "(cached) $ECHO_C" >&6
22399 else
22400   if test -n "$ac_ct_XCURSES_CONFIG"; then
22401   ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
22402 else
22403   ac_save_IFS=$IFS; IFS=$ac_path_separator
22404 ac_dummy="$PATH"
22405 for ac_dir in $ac_dummy; do
22406   IFS=$ac_save_IFS
22407   test -z "$ac_dir" && ac_dir=.
22408   $as_executable_p "$ac_dir/$ac_word" || continue
22409 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
22410 echo "$as_me:22410: found $ac_dir/$ac_word" >&5
22411 break
22412 done
22413
22414 fi
22415 fi
22416 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
22417 if test -n "$ac_ct_XCURSES_CONFIG"; then
22418   echo "$as_me:22418: result: $ac_ct_XCURSES_CONFIG" >&5
22419 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
22420 else
22421   echo "$as_me:22421: result: no" >&5
22422 echo "${ECHO_T}no" >&6
22423 fi
22424
22425   test -n "$ac_ct_XCURSES_CONFIG" && break
22426 done
22427 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
22428
22429   XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
22430 fi
22431
22432 if test "$XCURSES_CONFIG" != none ; then
22433
22434 cf_fix_cppflags=no
22435 cf_new_cflags=
22436 cf_new_cppflags=
22437 cf_new_extra_cppflags=
22438
22439 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
22440 do
22441 case "$cf_fix_cppflags" in
22442 (no)
22443         case "$cf_add_cflags" in
22444         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22445                 case "$cf_add_cflags" in
22446                 (-D*)
22447                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22448
22449                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22450                                 && test -z "${cf_tst_cflags}" \
22451                                 && cf_fix_cppflags=yes
22452
22453                         if test "$cf_fix_cppflags" = yes ; then
22454
22455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22457
22458                                 continue
22459                         elif test "${cf_tst_cflags}" = "\"'" ; then
22460
22461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22463
22464                                 continue
22465                         fi
22466                         ;;
22467                 esac
22468                 case "$CPPFLAGS" in
22469                 (*$cf_add_cflags)
22470                         ;;
22471                 (*)
22472                         case "$cf_add_cflags" in
22473                         (-D*)
22474                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22475
22476 CPPFLAGS=`echo "$CPPFLAGS" | \
22477         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22478                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22479
22480                                 ;;
22481                         esac
22482
22483         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22484         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22485
22486                         ;;
22487                 esac
22488                 ;;
22489         (*)
22490
22491         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22492         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22493
22494                 ;;
22495         esac
22496         ;;
22497 (yes)
22498
22499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22501
22502         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22503
22504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22505                 && test -z "${cf_tst_cflags}" \
22506                 && cf_fix_cppflags=no
22507         ;;
22508 esac
22509 done
22510
22511 if test -n "$cf_new_cflags" ; then
22512
22513         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22514         CFLAGS="${CFLAGS}$cf_new_cflags"
22515
22516 fi
22517
22518 if test -n "$cf_new_cppflags" ; then
22519
22520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22521         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22522
22523 fi
22524
22525 if test -n "$cf_new_extra_cppflags" ; then
22526
22527         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22528         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22529
22530 fi
22531
22532 cf_add_libs="$LIBS"
22533 # reverse order
22534 cf_add_0lib=
22535 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22536 # filter duplicates
22537 for cf_add_1lib in $cf_add_0lib; do
22538         for cf_add_2lib in $cf_add_libs; do
22539                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22540                         cf_add_1lib=
22541                         break
22542                 fi
22543         done
22544         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22545 done
22546 LIBS="$cf_add_libs"
22547
22548 cf_cv_lib_XCurses=yes
22549
22550 else
22551
22552 LDFLAGS="$LDFLAGS $X_LIBS"
22553
22554 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
22555
22556 echo "${as_me:-configure}:22556: testing checking additions to CFLAGS ..." 1>&5
22557
22558 cf_check_cflags="$CFLAGS"
22559 cf_check_cppflags="$CPPFLAGS"
22560
22561 cf_fix_cppflags=no
22562 cf_new_cflags=
22563 cf_new_cppflags=
22564 cf_new_extra_cppflags=
22565
22566 for cf_add_cflags in $X_CFLAGS
22567 do
22568 case "$cf_fix_cppflags" in
22569 (no)
22570         case "$cf_add_cflags" in
22571         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22572                 case "$cf_add_cflags" in
22573                 (-D*)
22574                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22575
22576                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22577                                 && test -z "${cf_tst_cflags}" \
22578                                 && cf_fix_cppflags=yes
22579
22580                         if test "$cf_fix_cppflags" = yes ; then
22581
22582         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22583         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22584
22585                                 continue
22586                         elif test "${cf_tst_cflags}" = "\"'" ; then
22587
22588         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22589         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22590
22591                                 continue
22592                         fi
22593                         ;;
22594                 esac
22595                 case "$CPPFLAGS" in
22596                 (*$cf_add_cflags)
22597                         ;;
22598                 (*)
22599                         case "$cf_add_cflags" in
22600                         (-D*)
22601                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22602
22603 CPPFLAGS=`echo "$CPPFLAGS" | \
22604         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22605                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22606
22607                                 ;;
22608                         esac
22609
22610         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22611         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22612
22613                         ;;
22614                 esac
22615                 ;;
22616         (*)
22617
22618         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22619         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22620
22621                 ;;
22622         esac
22623         ;;
22624 (yes)
22625
22626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22628
22629         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22630
22631         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22632                 && test -z "${cf_tst_cflags}" \
22633                 && cf_fix_cppflags=no
22634         ;;
22635 esac
22636 done
22637
22638 if test -n "$cf_new_cflags" ; then
22639         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
22640
22641 echo "${as_me:-configure}:22641: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
22642
22643         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22644         CFLAGS="${CFLAGS}$cf_new_cflags"
22645
22646 fi
22647
22648 if test -n "$cf_new_cppflags" ; then
22649         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
22650
22651 echo "${as_me:-configure}:22651: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
22652
22653         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22654         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22655
22656 fi
22657
22658 if test -n "$cf_new_extra_cppflags" ; then
22659         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
22660
22661 echo "${as_me:-configure}:22661: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
22662
22663         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22664         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22665
22666 fi
22667
22668 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
22669 cat >"conftest.$ac_ext" <<_ACEOF
22670 #line 22670 "configure"
22671 #include "confdefs.h"
22672 #include <stdio.h>
22673 int
22674 main (void)
22675 {
22676 printf("Hello world");
22677   ;
22678   return 0;
22679 }
22680 _ACEOF
22681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22682 if { (eval echo "$as_me:22682: \"$ac_link\"") >&5
22683   (eval $ac_link) 2>&5
22684   ac_status=$?
22685   echo "$as_me:22685: \$? = $ac_status" >&5
22686   (exit "$ac_status"); } &&
22687          { ac_try='test -s "conftest$ac_exeext"'
22688   { (eval echo "$as_me:22688: \"$ac_try\"") >&5
22689   (eval $ac_try) 2>&5
22690   ac_status=$?
22691   echo "$as_me:22691: \$? = $ac_status" >&5
22692   (exit "$ac_status"); }; }; then
22693   :
22694 else
22695   echo "$as_me: failed program was:" >&5
22696 cat "conftest.$ac_ext" >&5
22697 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
22698
22699 echo "${as_me:-configure}:22699: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
22700
22701          if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
22702                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
22703
22704 echo "${as_me:-configure}:22704: testing but keeping change to \$CPPFLAGS ..." 1>&5
22705
22706          fi
22707          CFLAGS="$cf_check_cflags"
22708 fi
22709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22710 fi
22711
22712 echo "$as_me:22712: checking for XOpenDisplay in -lX11" >&5
22713 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
22714 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
22715   echo $ECHO_N "(cached) $ECHO_C" >&6
22716 else
22717   ac_check_lib_save_LIBS=$LIBS
22718 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
22719 cat >"conftest.$ac_ext" <<_ACEOF
22720 #line 22720 "configure"
22721 #include "confdefs.h"
22722
22723 /* Override any gcc2 internal prototype to avoid an error.  */
22724 #ifdef __cplusplus
22725 extern "C"
22726 #endif
22727 /* We use char because int might match the return type of a gcc2
22728    builtin and then its argument prototype would still apply.  */
22729 char XOpenDisplay ();
22730 int
22731 main (void)
22732 {
22733 XOpenDisplay ();
22734   ;
22735   return 0;
22736 }
22737 _ACEOF
22738 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22739 if { (eval echo "$as_me:22739: \"$ac_link\"") >&5
22740   (eval $ac_link) 2>&5
22741   ac_status=$?
22742   echo "$as_me:22742: \$? = $ac_status" >&5
22743   (exit "$ac_status"); } &&
22744          { ac_try='test -s "conftest$ac_exeext"'
22745   { (eval echo "$as_me:22745: \"$ac_try\"") >&5
22746   (eval $ac_try) 2>&5
22747   ac_status=$?
22748   echo "$as_me:22748: \$? = $ac_status" >&5
22749   (exit "$ac_status"); }; }; then
22750   ac_cv_lib_X11_XOpenDisplay=yes
22751 else
22752   echo "$as_me: failed program was:" >&5
22753 cat "conftest.$ac_ext" >&5
22754 ac_cv_lib_X11_XOpenDisplay=no
22755 fi
22756 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22757 LIBS=$ac_check_lib_save_LIBS
22758 fi
22759 echo "$as_me:22759: result: $ac_cv_lib_X11_XOpenDisplay" >&5
22760 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
22761 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
22762
22763 cf_add_libs="$LIBS"
22764 # reverse order
22765 cf_add_0lib=
22766 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22767 # filter duplicates
22768 for cf_add_1lib in $cf_add_0lib; do
22769         for cf_add_2lib in $cf_add_libs; do
22770                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22771                         cf_add_1lib=
22772                         break
22773                 fi
22774         done
22775         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22776 done
22777 LIBS="$cf_add_libs"
22778
22779 fi
22780
22781 echo "$as_me:22781: checking for XCurses library" >&5
22782 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
22783 if test "${cf_cv_lib_XCurses+set}" = set; then
22784   echo $ECHO_N "(cached) $ECHO_C" >&6
22785 else
22786
22787 cf_add_libs="$LIBS"
22788 # reverse order
22789 cf_add_0lib=
22790 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22791 # filter duplicates
22792 for cf_add_1lib in $cf_add_0lib; do
22793         for cf_add_2lib in $cf_add_libs; do
22794                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22795                         cf_add_1lib=
22796                         break
22797                 fi
22798         done
22799         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22800 done
22801 LIBS="$cf_add_libs"
22802
22803 cat >"conftest.$ac_ext" <<_ACEOF
22804 #line 22804 "configure"
22805 #include "confdefs.h"
22806
22807 #include <xcurses.h>
22808 char *XCursesProgramName = "test";
22809
22810 int
22811 main (void)
22812 {
22813 XCursesExit();
22814   ;
22815   return 0;
22816 }
22817 _ACEOF
22818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22819 if { (eval echo "$as_me:22819: \"$ac_link\"") >&5
22820   (eval $ac_link) 2>&5
22821   ac_status=$?
22822   echo "$as_me:22822: \$? = $ac_status" >&5
22823   (exit "$ac_status"); } &&
22824          { ac_try='test -s "conftest$ac_exeext"'
22825   { (eval echo "$as_me:22825: \"$ac_try\"") >&5
22826   (eval $ac_try) 2>&5
22827   ac_status=$?
22828   echo "$as_me:22828: \$? = $ac_status" >&5
22829   (exit "$ac_status"); }; }; then
22830   cf_cv_lib_XCurses=yes
22831 else
22832   echo "$as_me: failed program was:" >&5
22833 cat "conftest.$ac_ext" >&5
22834 cf_cv_lib_XCurses=no
22835 fi
22836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22837
22838 fi
22839 echo "$as_me:22839: result: $cf_cv_lib_XCurses" >&5
22840 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
22841
22842 fi
22843
22844 if test "$cf_cv_lib_XCurses" = yes ; then
22845
22846 cat >>confdefs.h <<\EOF
22847 #define UNIX 1
22848 EOF
22849
22850 cat >>confdefs.h <<\EOF
22851 #define XCURSES 1
22852 EOF
22853
22854         echo "$as_me:22854: checking for xcurses.h" >&5
22855 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
22856 if test "${ac_cv_header_xcurses_h+set}" = set; then
22857   echo $ECHO_N "(cached) $ECHO_C" >&6
22858 else
22859   cat >"conftest.$ac_ext" <<_ACEOF
22860 #line 22860 "configure"
22861 #include "confdefs.h"
22862 #include <xcurses.h>
22863 _ACEOF
22864 if { (eval echo "$as_me:22864: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22865   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22866   ac_status=$?
22867   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22868   rm -f conftest.er1
22869   cat conftest.err >&5
22870   echo "$as_me:22870: \$? = $ac_status" >&5
22871   (exit "$ac_status"); } >/dev/null; then
22872   if test -s conftest.err; then
22873     ac_cpp_err=$ac_c_preproc_warn_flag
22874   else
22875     ac_cpp_err=
22876   fi
22877 else
22878   ac_cpp_err=yes
22879 fi
22880 if test -z "$ac_cpp_err"; then
22881   ac_cv_header_xcurses_h=yes
22882 else
22883   echo "$as_me: failed program was:" >&5
22884   cat "conftest.$ac_ext" >&5
22885   ac_cv_header_xcurses_h=no
22886 fi
22887 rm -f conftest.err "conftest.$ac_ext"
22888 fi
22889 echo "$as_me:22889: result: $ac_cv_header_xcurses_h" >&5
22890 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
22891 if test "$ac_cv_header_xcurses_h" = yes; then
22892
22893 cat >>confdefs.h <<\EOF
22894 #define HAVE_XCURSES 1
22895 EOF
22896
22897 fi
22898
22899 else
22900         { { echo "$as_me:22900: error: Cannot link with XCurses" >&5
22901 echo "$as_me: error: Cannot link with XCurses" >&2;}
22902    { (exit 1); exit 1; }; }
22903 fi
22904
22905         ;;
22906 (*)
22907         { { echo "$as_me:22907: error: unexpected screen-value: $cf_cv_screen" >&5
22908 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
22909    { (exit 1); exit 1; }; }
22910         ;;
22911 esac
22912
22913 : ${cf_nculib_root:=$cf_cv_screen}
22914 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
22915 echo "$as_me:22915: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
22916 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
22917 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
22918   echo $ECHO_N "(cached) $ECHO_C" >&6
22919 else
22920   ac_check_lib_save_LIBS=$LIBS
22921 LIBS="-l$cf_nculib_root  $LIBS"
22922 cat >"conftest.$ac_ext" <<_ACEOF
22923 #line 22923 "configure"
22924 #include "confdefs.h"
22925
22926 /* Override any gcc2 internal prototype to avoid an error.  */
22927 #ifdef __cplusplus
22928 extern "C"
22929 #endif
22930 /* We use char because int might match the return type of a gcc2
22931    builtin and then its argument prototype would still apply.  */
22932 char _nc_init_pthreads ();
22933 int
22934 main (void)
22935 {
22936 _nc_init_pthreads ();
22937   ;
22938   return 0;
22939 }
22940 _ACEOF
22941 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22942 if { (eval echo "$as_me:22942: \"$ac_link\"") >&5
22943   (eval $ac_link) 2>&5
22944   ac_status=$?
22945   echo "$as_me:22945: \$? = $ac_status" >&5
22946   (exit "$ac_status"); } &&
22947          { ac_try='test -s "conftest$ac_exeext"'
22948   { (eval echo "$as_me:22948: \"$ac_try\"") >&5
22949   (eval $ac_try) 2>&5
22950   ac_status=$?
22951   echo "$as_me:22951: \$? = $ac_status" >&5
22952   (exit "$ac_status"); }; }; then
22953   eval "$as_ac_Lib=yes"
22954 else
22955   echo "$as_me: failed program was:" >&5
22956 cat "conftest.$ac_ext" >&5
22957 eval "$as_ac_Lib=no"
22958 fi
22959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22960 LIBS=$ac_check_lib_save_LIBS
22961 fi
22962 echo "$as_me:22962: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
22963 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
22964 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
22965   cf_cv_ncurses_pthreads=yes
22966 else
22967   cf_cv_ncurses_pthreads=no
22968 fi
22969
22970 if test "$cf_cv_ncurses_pthreads" = yes
22971 then
22972
22973 cf_add_libs="$LIBS"
22974 # reverse order
22975 cf_add_0lib=
22976 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22977 # filter duplicates
22978 for cf_add_1lib in $cf_add_0lib; do
22979         for cf_add_2lib in $cf_add_libs; do
22980                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22981                         cf_add_1lib=
22982                         break
22983                 fi
22984         done
22985         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22986 done
22987 LIBS="$cf_add_libs"
22988
22989 fi
22990
22991 echo "$as_me:22991: checking if curses supports wide characters" >&5
22992 echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
22993 if test "${cf_cv_widec_curses+set}" = set; then
22994   echo $ECHO_N "(cached) $ECHO_C" >&6
22995 else
22996
22997 cat >"conftest.$ac_ext" <<_ACEOF
22998 #line 22998 "configure"
22999 #include "confdefs.h"
23000
23001 #include <stdlib.h>
23002 #include <${cf_cv_ncurses_header:-curses.h}>
23003 int
23004 main (void)
23005 {
23006
23007     wchar_t temp[2];
23008     wchar_t wch = 'A';
23009     temp[0] = wch;
23010     waddnwstr(stdscr, temp, 1);
23011
23012   ;
23013   return 0;
23014 }
23015 _ACEOF
23016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23017 if { (eval echo "$as_me:23017: \"$ac_link\"") >&5
23018   (eval $ac_link) 2>&5
23019   ac_status=$?
23020   echo "$as_me:23020: \$? = $ac_status" >&5
23021   (exit "$ac_status"); } &&
23022          { ac_try='test -s "conftest$ac_exeext"'
23023   { (eval echo "$as_me:23023: \"$ac_try\"") >&5
23024   (eval $ac_try) 2>&5
23025   ac_status=$?
23026   echo "$as_me:23026: \$? = $ac_status" >&5
23027   (exit "$ac_status"); }; }; then
23028   cf_cv_widec_curses=yes
23029 else
23030   echo "$as_me: failed program was:" >&5
23031 cat "conftest.$ac_ext" >&5
23032 cf_cv_widec_curses=no
23033 fi
23034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23035
23036 fi
23037 echo "$as_me:23037: result: $cf_cv_widec_curses" >&5
23038 echo "${ECHO_T}$cf_cv_widec_curses" >&6
23039
23040 if test "$cf_cv_widec_curses" = yes ; then
23041
23042 cat >>confdefs.h <<\EOF
23043 #define WIDEC_CURSES 1
23044 EOF
23045
23046         # This is needed on Tru64 5.0 to declare mbstate_t
23047         echo "$as_me:23047: checking if we must include wchar.h to declare mbstate_t" >&5
23048 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
23049 if test "${cf_cv_widec_mbstate+set}" = set; then
23050   echo $ECHO_N "(cached) $ECHO_C" >&6
23051 else
23052
23053         cat >"conftest.$ac_ext" <<_ACEOF
23054 #line 23054 "configure"
23055 #include "confdefs.h"
23056
23057 #include <stdlib.h>
23058 #include <${cf_cv_ncurses_header:-curses.h}>
23059 int
23060 main (void)
23061 {
23062 mbstate_t state; (void)state
23063   ;
23064   return 0;
23065 }
23066 _ACEOF
23067 rm -f "conftest.$ac_objext"
23068 if { (eval echo "$as_me:23068: \"$ac_compile\"") >&5
23069   (eval $ac_compile) 2>&5
23070   ac_status=$?
23071   echo "$as_me:23071: \$? = $ac_status" >&5
23072   (exit "$ac_status"); } &&
23073          { ac_try='test -s "conftest.$ac_objext"'
23074   { (eval echo "$as_me:23074: \"$ac_try\"") >&5
23075   (eval $ac_try) 2>&5
23076   ac_status=$?
23077   echo "$as_me:23077: \$? = $ac_status" >&5
23078   (exit "$ac_status"); }; }; then
23079   cf_cv_widec_mbstate=no
23080 else
23081   echo "$as_me: failed program was:" >&5
23082 cat "conftest.$ac_ext" >&5
23083 cat >"conftest.$ac_ext" <<_ACEOF
23084 #line 23084 "configure"
23085 #include "confdefs.h"
23086
23087 #include <stdlib.h>
23088 #include <wchar.h>
23089 #include <${cf_cv_ncurses_header:-curses.h}>
23090 int
23091 main (void)
23092 {
23093 mbstate_t state; (void)state
23094   ;
23095   return 0;
23096 }
23097 _ACEOF
23098 rm -f "conftest.$ac_objext"
23099 if { (eval echo "$as_me:23099: \"$ac_compile\"") >&5
23100   (eval $ac_compile) 2>&5
23101   ac_status=$?
23102   echo "$as_me:23102: \$? = $ac_status" >&5
23103   (exit "$ac_status"); } &&
23104          { ac_try='test -s "conftest.$ac_objext"'
23105   { (eval echo "$as_me:23105: \"$ac_try\"") >&5
23106   (eval $ac_try) 2>&5
23107   ac_status=$?
23108   echo "$as_me:23108: \$? = $ac_status" >&5
23109   (exit "$ac_status"); }; }; then
23110   cf_cv_widec_mbstate=yes
23111 else
23112   echo "$as_me: failed program was:" >&5
23113 cat "conftest.$ac_ext" >&5
23114 cf_cv_widec_mbstate=unknown
23115 fi
23116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23117 fi
23118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23119 fi
23120 echo "$as_me:23120: result: $cf_cv_widec_mbstate" >&5
23121 echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
23122
23123 if test "$cf_cv_widec_mbstate" = yes ; then
23124
23125 cat >>confdefs.h <<\EOF
23126 #define NEED_WCHAR_H 1
23127 EOF
23128
23129 fi
23130
23131 if test "$cf_cv_widec_mbstate" != unknown ; then
23132
23133 cat >>confdefs.h <<\EOF
23134 #define HAVE_MBSTATE_T 1
23135 EOF
23136
23137 fi
23138
23139 fi
23140
23141 cf_all_widgets=yes
23142
23143 echo "$as_me:23143: checking if you want extra dialogs" >&5
23144 echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
23145
23146 # Check whether --enable-extras or --disable-extras was given.
23147 if test "${enable_extras+set}" = set; then
23148   enableval="$enable_extras"
23149
23150 else
23151   enableval=yes
23152 fi;
23153 echo "$as_me:23153: result: $enableval" >&5
23154 echo "${ECHO_T}$enableval" >&6
23155 if test "$enableval" != no ; then
23156 cf_all_widgets=yes
23157 else
23158 cf_all_widgets=no
23159 fi
23160
23161 cf_use_dialogrc=yes
23162
23163 echo "$as_me:23163: checking if you want config-file support" >&5
23164 echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
23165
23166 # Check whether --enable-rc-file or --disable-rc-file was given.
23167 if test "${enable_rc_file+set}" = set; then
23168   enableval="$enable_rc_file"
23169
23170 else
23171   enableval=$cf_all_widgets
23172 fi;
23173 echo "$as_me:23173: result: $enableval" >&5
23174 echo "${ECHO_T}$enableval" >&6
23175 if test "$enableval" != no ; then
23176 EXTRAOBJS="$EXTRAOBJS rc\$o"
23177
23178 cat >>confdefs.h <<\EOF
23179 #define HAVE_RC_FILE 1
23180 EOF
23181
23182 else
23183 cf_use_dialogrc=no
23184 fi
23185
23186 cf_use_dialogrc2=yes
23187 if test "$cf_use_dialogrc" = yes; then
23188
23189 echo "$as_me:23189: checking if you want extra attributes in config-file" >&5
23190 echo $ECHO_N "checking if you want extra attributes in config-file... $ECHO_C" >&6
23191
23192 # Check whether --enable-rc-file2 or --disable-rc-file2 was given.
23193 if test "${enable_rc_file2+set}" = set; then
23194   enableval="$enable_rc_file2"
23195
23196 else
23197   enableval=$cf_all_widgets
23198 fi;
23199 echo "$as_me:23199: result: $enableval" >&5
23200 echo "${ECHO_T}$enableval" >&6
23201 if test "$enableval" != no ; then
23202
23203 cat >>confdefs.h <<\EOF
23204 #define HAVE_RC_FILE2 1
23205 EOF
23206
23207 else
23208 cf_use_dialogrc2=no
23209 fi
23210
23211 fi
23212
23213 echo "$as_me:23213: checking if you want Xdialog-style dialogs" >&5
23214 echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
23215
23216 # Check whether --enable-Xdialog or --disable-Xdialog was given.
23217 if test "${enable_Xdialog+set}" = set; then
23218   enableval="$enable_Xdialog"
23219
23220 else
23221   enableval=$cf_all_widgets
23222 fi;
23223 echo "$as_me:23223: result: $enableval" >&5
23224 echo "${ECHO_T}$enableval" >&6
23225 if test "$enableval" != no ; then
23226 EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
23227
23228 cat >>confdefs.h <<\EOF
23229 #define HAVE_XDIALOG 1
23230 EOF
23231
23232 else
23233         :
23234 fi
23235
23236 echo "$as_me:23236: checking if you want extra Xdialog-style dialogs (1.2)" >&5
23237 echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
23238
23239 # Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
23240 if test "${enable_Xdialog2+set}" = set; then
23241   enableval="$enable_Xdialog2"
23242
23243 else
23244   enableval=$cf_all_widgets
23245 fi;
23246 echo "$as_me:23246: result: $enableval" >&5
23247 echo "${ECHO_T}$enableval" >&6
23248 if test "$enableval" != no ; then
23249 EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
23250
23251 cat >>confdefs.h <<\EOF
23252 #define HAVE_XDIALOG2 1
23253 EOF
23254
23255 else
23256         :
23257 fi
23258
23259 echo "$as_me:23259: checking if you want compatibility with whiptail options" >&5
23260 echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
23261
23262 # Check whether --enable-whiptail or --disable-whiptail was given.
23263 if test "${enable_whiptail+set}" = set; then
23264   enableval="$enable_whiptail"
23265
23266 else
23267   enableval=$cf_all_widgets
23268 fi;
23269 echo "$as_me:23269: result: $enableval" >&5
23270 echo "${ECHO_T}$enableval" >&6
23271 if test "$enableval" != no ; then
23272
23273 cat >>confdefs.h <<\EOF
23274 #define HAVE_WHIPTAIL 1
23275 EOF
23276
23277 else
23278         :
23279 fi
23280
23281 echo "$as_me:23281: checking if you want the form dialog" >&5
23282 echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
23283
23284 # Check whether --enable-form or --disable-form was given.
23285 if test "${enable_form+set}" = set; then
23286   enableval="$enable_form"
23287
23288 else
23289   enableval=$cf_all_widgets
23290 fi;
23291 echo "$as_me:23291: result: $enableval" >&5
23292 echo "${ECHO_T}$enableval" >&6
23293 if test "$enableval" != no ; then
23294 EXTRAOBJS="$EXTRAOBJS formbox\$o"
23295
23296 cat >>confdefs.h <<\EOF
23297 #define HAVE_DLG_FORMBOX 1
23298 EOF
23299
23300 else
23301         :
23302 fi
23303
23304 echo "$as_me:23304: checking if you want the gauge dialog" >&5
23305 echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
23306
23307 # Check whether --enable-gauge or --disable-gauge was given.
23308 if test "${enable_gauge+set}" = set; then
23309   enableval="$enable_gauge"
23310
23311 else
23312   enableval=$cf_all_widgets
23313 fi;
23314 echo "$as_me:23314: result: $enableval" >&5
23315 echo "${ECHO_T}$enableval" >&6
23316 if test "$enableval" != no ; then
23317 EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
23318
23319 cat >>confdefs.h <<\EOF
23320 #define HAVE_DLG_GAUGE 1
23321 EOF
23322
23323 else
23324         :
23325 fi
23326
23327 echo "$as_me:23327: checking if you want the tailbox dialog" >&5
23328 echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
23329
23330 # Check whether --enable-tailbox or --disable-tailbox was given.
23331 if test "${enable_tailbox+set}" = set; then
23332   enableval="$enable_tailbox"
23333
23334 else
23335   enableval=$cf_all_widgets
23336 fi;
23337 echo "$as_me:23337: result: $enableval" >&5
23338 echo "${ECHO_T}$enableval" >&6
23339 if test "$enableval" != no ; then
23340 EXTRAOBJS="$EXTRAOBJS tailbox\$o"
23341
23342 cat >>confdefs.h <<\EOF
23343 #define HAVE_DLG_TAILBOX 1
23344 EOF
23345
23346 else
23347         :
23348 fi
23349
23350 echo "$as_me:23350: checking if you want the mixedform dialog" >&5
23351 echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
23352
23353 # Check whether --enable-mixedform or --disable-mixedform was given.
23354 if test "${enable_mixedform+set}" = set; then
23355   enableval="$enable_mixedform"
23356
23357 else
23358   enableval=${enable_form:=$cf_all_widgets}
23359 fi;
23360 echo "$as_me:23360: result: $enableval" >&5
23361 echo "${ECHO_T}$enableval" >&6
23362 if test "$enableval" != no ; then
23363 EXTRAOBJS="$EXTRAOBJS mixedform\$o"
23364
23365 cat >>confdefs.h <<\EOF
23366 #define HAVE_DLG_MIXEDFORM 1
23367 EOF
23368
23369 else
23370         :
23371 fi
23372
23373 echo "$as_me:23373: checking if you want the mixedgauge dialog" >&5
23374 echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
23375
23376 # Check whether --enable-mixedgauge or --disable-mixedgauge was given.
23377 if test "${enable_mixedgauge+set}" = set; then
23378   enableval="$enable_mixedgauge"
23379
23380 else
23381   enableval=$cf_all_widgets
23382 fi;
23383 echo "$as_me:23383: result: $enableval" >&5
23384 echo "${ECHO_T}$enableval" >&6
23385 if test "$enableval" != no ; then
23386 EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
23387
23388 cat >>confdefs.h <<\EOF
23389 #define HAVE_MIXEDGAUGE 1
23390 EOF
23391
23392 else
23393         :
23394 fi
23395
23396 echo "$as_me:23396: checking if you want the wide-curses features" >&5
23397 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
23398
23399 # Check whether --enable-widec or --disable-widec was given.
23400 if test "${enable_widec+set}" = set; then
23401   enableval="$enable_widec"
23402
23403 else
23404   enableval=$cf_cv_widec_curses
23405 fi;
23406 echo "$as_me:23406: result: $enableval" >&5
23407 echo "${ECHO_T}$enableval" >&6
23408 if test "$enableval" != no ; then
23409
23410 cat >>confdefs.h <<\EOF
23411 #define USE_WIDE_CURSES 1
23412 EOF
23413
23414 else
23415         :
23416 fi
23417
23418 echo "$as_me:23418: checking for ANSI C header files" >&5
23419 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
23420 if test "${ac_cv_header_stdc+set}" = set; then
23421   echo $ECHO_N "(cached) $ECHO_C" >&6
23422 else
23423   cat >"conftest.$ac_ext" <<_ACEOF
23424 #line 23424 "configure"
23425 #include "confdefs.h"
23426 #include <stdlib.h>
23427 #include <stdarg.h>
23428 #include <string.h>
23429 #include <float.h>
23430
23431 _ACEOF
23432 if { (eval echo "$as_me:23432: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23433   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23434   ac_status=$?
23435   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23436   rm -f conftest.er1
23437   cat conftest.err >&5
23438   echo "$as_me:23438: \$? = $ac_status" >&5
23439   (exit "$ac_status"); } >/dev/null; then
23440   if test -s conftest.err; then
23441     ac_cpp_err=$ac_c_preproc_warn_flag
23442   else
23443     ac_cpp_err=
23444   fi
23445 else
23446   ac_cpp_err=yes
23447 fi
23448 if test -z "$ac_cpp_err"; then
23449   ac_cv_header_stdc=yes
23450 else
23451   echo "$as_me: failed program was:" >&5
23452   cat "conftest.$ac_ext" >&5
23453   ac_cv_header_stdc=no
23454 fi
23455 rm -f conftest.err "conftest.$ac_ext"
23456
23457 if test $ac_cv_header_stdc = yes; then
23458   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
23459   cat >"conftest.$ac_ext" <<_ACEOF
23460 #line 23460 "configure"
23461 #include "confdefs.h"
23462 #include <string.h>
23463
23464 _ACEOF
23465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23466   $EGREP "memchr" >/dev/null 2>&1; then
23467   :
23468 else
23469   ac_cv_header_stdc=no
23470 fi
23471 rm -rf conftest*
23472
23473 fi
23474
23475 if test $ac_cv_header_stdc = yes; then
23476   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
23477   cat >"conftest.$ac_ext" <<_ACEOF
23478 #line 23478 "configure"
23479 #include "confdefs.h"
23480 #include <stdlib.h>
23481
23482 _ACEOF
23483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23484   $EGREP "free" >/dev/null 2>&1; then
23485   :
23486 else
23487   ac_cv_header_stdc=no
23488 fi
23489 rm -rf conftest*
23490
23491 fi
23492
23493 if test $ac_cv_header_stdc = yes; then
23494   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
23495   if test "$cross_compiling" = yes; then
23496   :
23497 else
23498   cat >"conftest.$ac_ext" <<_ACEOF
23499 #line 23499 "configure"
23500 #include "confdefs.h"
23501 #include <ctype.h>
23502 #if ((' ' & 0x0FF) == 0x020)
23503 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
23504 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
23505 #else
23506 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
23507                      || ('j' <= (c) && (c) <= 'r') \
23508                      || ('s' <= (c) && (c) <= 'z'))
23509 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
23510 #endif
23511
23512 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
23513 int
23514 main (void)
23515 {
23516   int i;
23517   for (i = 0; i < 256; i++)
23518     if (XOR (islower (i), ISLOWER (i))
23519         || toupper (i) != TOUPPER (i))
23520       $ac_main_return(2);
23521   $ac_main_return (0);
23522 }
23523 _ACEOF
23524 rm -f "conftest$ac_exeext"
23525 if { (eval echo "$as_me:23525: \"$ac_link\"") >&5
23526   (eval $ac_link) 2>&5
23527   ac_status=$?
23528   echo "$as_me:23528: \$? = $ac_status" >&5
23529   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23530   { (eval echo "$as_me:23530: \"$ac_try\"") >&5
23531   (eval $ac_try) 2>&5
23532   ac_status=$?
23533   echo "$as_me:23533: \$? = $ac_status" >&5
23534   (exit "$ac_status"); }; }; then
23535   :
23536 else
23537   echo "$as_me: program exited with status $ac_status" >&5
23538 echo "$as_me: failed program was:" >&5
23539 cat "conftest.$ac_ext" >&5
23540 ac_cv_header_stdc=no
23541 fi
23542 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23543 fi
23544 fi
23545 fi
23546 echo "$as_me:23546: result: $ac_cv_header_stdc" >&5
23547 echo "${ECHO_T}$ac_cv_header_stdc" >&6
23548 if test $ac_cv_header_stdc = yes; then
23549
23550 cat >>confdefs.h <<\EOF
23551 #define STDC_HEADERS 1
23552 EOF
23553
23554 fi
23555
23556 echo "$as_me:23556: checking whether time.h and sys/time.h may both be included" >&5
23557 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
23558 if test "${ac_cv_header_time+set}" = set; then
23559   echo $ECHO_N "(cached) $ECHO_C" >&6
23560 else
23561   cat >"conftest.$ac_ext" <<_ACEOF
23562 #line 23562 "configure"
23563 #include "confdefs.h"
23564 #include <sys/types.h>
23565 #include <sys/time.h>
23566 #include <time.h>
23567
23568 int
23569 main (void)
23570 {
23571 if ((struct tm *) 0)
23572 return 0;
23573   ;
23574   return 0;
23575 }
23576 _ACEOF
23577 rm -f "conftest.$ac_objext"
23578 if { (eval echo "$as_me:23578: \"$ac_compile\"") >&5
23579   (eval $ac_compile) 2>&5
23580   ac_status=$?
23581   echo "$as_me:23581: \$? = $ac_status" >&5
23582   (exit "$ac_status"); } &&
23583          { ac_try='test -s "conftest.$ac_objext"'
23584   { (eval echo "$as_me:23584: \"$ac_try\"") >&5
23585   (eval $ac_try) 2>&5
23586   ac_status=$?
23587   echo "$as_me:23587: \$? = $ac_status" >&5
23588   (exit "$ac_status"); }; }; then
23589   ac_cv_header_time=yes
23590 else
23591   echo "$as_me: failed program was:" >&5
23592 cat "conftest.$ac_ext" >&5
23593 ac_cv_header_time=no
23594 fi
23595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23596 fi
23597 echo "$as_me:23597: result: $ac_cv_header_time" >&5
23598 echo "${ECHO_T}$ac_cv_header_time" >&6
23599 if test $ac_cv_header_time = yes; then
23600
23601 cat >>confdefs.h <<\EOF
23602 #define TIME_WITH_SYS_TIME 1
23603 EOF
23604
23605 fi
23606
23607 ac_header_dirent=no
23608 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23609   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23610 echo "$as_me:23610: checking for $ac_hdr that defines DIR" >&5
23611 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
23612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23613   echo $ECHO_N "(cached) $ECHO_C" >&6
23614 else
23615   cat >"conftest.$ac_ext" <<_ACEOF
23616 #line 23616 "configure"
23617 #include "confdefs.h"
23618 #include <sys/types.h>
23619 #include <$ac_hdr>
23620
23621 int
23622 main (void)
23623 {
23624 if ((DIR *) 0)
23625 return 0;
23626   ;
23627   return 0;
23628 }
23629 _ACEOF
23630 rm -f "conftest.$ac_objext"
23631 if { (eval echo "$as_me:23631: \"$ac_compile\"") >&5
23632   (eval $ac_compile) 2>&5
23633   ac_status=$?
23634   echo "$as_me:23634: \$? = $ac_status" >&5
23635   (exit "$ac_status"); } &&
23636          { ac_try='test -s "conftest.$ac_objext"'
23637   { (eval echo "$as_me:23637: \"$ac_try\"") >&5
23638   (eval $ac_try) 2>&5
23639   ac_status=$?
23640   echo "$as_me:23640: \$? = $ac_status" >&5
23641   (exit "$ac_status"); }; }; then
23642   eval "$as_ac_Header=yes"
23643 else
23644   echo "$as_me: failed program was:" >&5
23645 cat "conftest.$ac_ext" >&5
23646 eval "$as_ac_Header=no"
23647 fi
23648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23649 fi
23650 echo "$as_me:23650: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23651 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23652 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23653   cat >>confdefs.h <<EOF
23654 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23655 EOF
23656
23657 ac_header_dirent=$ac_hdr; break
23658 fi
23659
23660 done
23661 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23662 if test $ac_header_dirent = dirent.h; then
23663   echo "$as_me:23663: checking for opendir in -ldir" >&5
23664 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
23665 if test "${ac_cv_lib_dir_opendir+set}" = set; then
23666   echo $ECHO_N "(cached) $ECHO_C" >&6
23667 else
23668   ac_check_lib_save_LIBS=$LIBS
23669 LIBS="-ldir  $LIBS"
23670 cat >"conftest.$ac_ext" <<_ACEOF
23671 #line 23671 "configure"
23672 #include "confdefs.h"
23673
23674 /* Override any gcc2 internal prototype to avoid an error.  */
23675 #ifdef __cplusplus
23676 extern "C"
23677 #endif
23678 /* We use char because int might match the return type of a gcc2
23679    builtin and then its argument prototype would still apply.  */
23680 char opendir ();
23681 int
23682 main (void)
23683 {
23684 opendir ();
23685   ;
23686   return 0;
23687 }
23688 _ACEOF
23689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23690 if { (eval echo "$as_me:23690: \"$ac_link\"") >&5
23691   (eval $ac_link) 2>&5
23692   ac_status=$?
23693   echo "$as_me:23693: \$? = $ac_status" >&5
23694   (exit "$ac_status"); } &&
23695          { ac_try='test -s "conftest$ac_exeext"'
23696   { (eval echo "$as_me:23696: \"$ac_try\"") >&5
23697   (eval $ac_try) 2>&5
23698   ac_status=$?
23699   echo "$as_me:23699: \$? = $ac_status" >&5
23700   (exit "$ac_status"); }; }; then
23701   ac_cv_lib_dir_opendir=yes
23702 else
23703   echo "$as_me: failed program was:" >&5
23704 cat "conftest.$ac_ext" >&5
23705 ac_cv_lib_dir_opendir=no
23706 fi
23707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23708 LIBS=$ac_check_lib_save_LIBS
23709 fi
23710 echo "$as_me:23710: result: $ac_cv_lib_dir_opendir" >&5
23711 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
23712 if test "$ac_cv_lib_dir_opendir" = yes; then
23713   LIBS="$LIBS -ldir"
23714 fi
23715
23716 else
23717   echo "$as_me:23717: checking for opendir in -lx" >&5
23718 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
23719 if test "${ac_cv_lib_x_opendir+set}" = set; then
23720   echo $ECHO_N "(cached) $ECHO_C" >&6
23721 else
23722   ac_check_lib_save_LIBS=$LIBS
23723 LIBS="-lx  $LIBS"
23724 cat >"conftest.$ac_ext" <<_ACEOF
23725 #line 23725 "configure"
23726 #include "confdefs.h"
23727
23728 /* Override any gcc2 internal prototype to avoid an error.  */
23729 #ifdef __cplusplus
23730 extern "C"
23731 #endif
23732 /* We use char because int might match the return type of a gcc2
23733    builtin and then its argument prototype would still apply.  */
23734 char opendir ();
23735 int
23736 main (void)
23737 {
23738 opendir ();
23739   ;
23740   return 0;
23741 }
23742 _ACEOF
23743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23744 if { (eval echo "$as_me:23744: \"$ac_link\"") >&5
23745   (eval $ac_link) 2>&5
23746   ac_status=$?
23747   echo "$as_me:23747: \$? = $ac_status" >&5
23748   (exit "$ac_status"); } &&
23749          { ac_try='test -s "conftest$ac_exeext"'
23750   { (eval echo "$as_me:23750: \"$ac_try\"") >&5
23751   (eval $ac_try) 2>&5
23752   ac_status=$?
23753   echo "$as_me:23753: \$? = $ac_status" >&5
23754   (exit "$ac_status"); }; }; then
23755   ac_cv_lib_x_opendir=yes
23756 else
23757   echo "$as_me: failed program was:" >&5
23758 cat "conftest.$ac_ext" >&5
23759 ac_cv_lib_x_opendir=no
23760 fi
23761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23762 LIBS=$ac_check_lib_save_LIBS
23763 fi
23764 echo "$as_me:23764: result: $ac_cv_lib_x_opendir" >&5
23765 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
23766 if test "$ac_cv_lib_x_opendir" = yes; then
23767   LIBS="$LIBS -lx"
23768 fi
23769
23770 fi
23771
23772 for ac_header in search.h stdint.h sys/param.h unistd.h
23773 do
23774 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23775 echo "$as_me:23775: checking for $ac_header" >&5
23776 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23778   echo $ECHO_N "(cached) $ECHO_C" >&6
23779 else
23780   cat >"conftest.$ac_ext" <<_ACEOF
23781 #line 23781 "configure"
23782 #include "confdefs.h"
23783 #include <$ac_header>
23784 _ACEOF
23785 if { (eval echo "$as_me:23785: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23786   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23787   ac_status=$?
23788   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23789   rm -f conftest.er1
23790   cat conftest.err >&5
23791   echo "$as_me:23791: \$? = $ac_status" >&5
23792   (exit "$ac_status"); } >/dev/null; then
23793   if test -s conftest.err; then
23794     ac_cpp_err=$ac_c_preproc_warn_flag
23795   else
23796     ac_cpp_err=
23797   fi
23798 else
23799   ac_cpp_err=yes
23800 fi
23801 if test -z "$ac_cpp_err"; then
23802   eval "$as_ac_Header=yes"
23803 else
23804   echo "$as_me: failed program was:" >&5
23805   cat "conftest.$ac_ext" >&5
23806   eval "$as_ac_Header=no"
23807 fi
23808 rm -f conftest.err "conftest.$ac_ext"
23809 fi
23810 echo "$as_me:23810: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23811 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23812 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23813   cat >>confdefs.h <<EOF
23814 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23815 EOF
23816
23817 fi
23818 done
23819
23820 echo "$as_me:23820: checking for term.h" >&5
23821 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
23822 if test "${cf_cv_term_header+set}" = set; then
23823   echo $ECHO_N "(cached) $ECHO_C" >&6
23824 else
23825
23826 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
23827 # for <term.h> if we do not find the variant.
23828
23829 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
23830
23831 case "${cf_cv_ncurses_header:-curses.h}" in
23832 (*/*)
23833         cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
23834         cf_header_list="$cf_header_item $cf_header_list"
23835         ;;
23836 esac
23837
23838 for cf_header in $cf_header_list
23839 do
23840         cat >"conftest.$ac_ext" <<_ACEOF
23841 #line 23841 "configure"
23842 #include "confdefs.h"
23843
23844 #include <${cf_cv_ncurses_header:-curses.h}>
23845 #include <${cf_header}>
23846 int
23847 main (void)
23848 {
23849 WINDOW *x; (void)x
23850   ;
23851   return 0;
23852 }
23853 _ACEOF
23854 rm -f "conftest.$ac_objext"
23855 if { (eval echo "$as_me:23855: \"$ac_compile\"") >&5
23856   (eval $ac_compile) 2>&5
23857   ac_status=$?
23858   echo "$as_me:23858: \$? = $ac_status" >&5
23859   (exit "$ac_status"); } &&
23860          { ac_try='test -s "conftest.$ac_objext"'
23861   { (eval echo "$as_me:23861: \"$ac_try\"") >&5
23862   (eval $ac_try) 2>&5
23863   ac_status=$?
23864   echo "$as_me:23864: \$? = $ac_status" >&5
23865   (exit "$ac_status"); }; }; then
23866   cf_cv_term_header=$cf_header
23867          break
23868 else
23869   echo "$as_me: failed program was:" >&5
23870 cat "conftest.$ac_ext" >&5
23871 cf_cv_term_header=no
23872 fi
23873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23874 done
23875
23876 case "$cf_cv_term_header" in
23877 (no)
23878         # If curses is ncurses, some packagers still mess it up by trying to make
23879         # us use GNU termcap.  This handles the most common case.
23880         for cf_header in ncurses/term.h ncursesw/term.h
23881         do
23882                 cat >"conftest.$ac_ext" <<_ACEOF
23883 #line 23883 "configure"
23884 #include "confdefs.h"
23885
23886 #include <${cf_cv_ncurses_header:-curses.h}>
23887 #ifdef NCURSES_VERSION
23888 #include <${cf_header}>
23889 #else
23890 make an error
23891 #endif
23892 int
23893 main (void)
23894 {
23895 WINDOW *x; (void)x
23896   ;
23897   return 0;
23898 }
23899 _ACEOF
23900 rm -f "conftest.$ac_objext"
23901 if { (eval echo "$as_me:23901: \"$ac_compile\"") >&5
23902   (eval $ac_compile) 2>&5
23903   ac_status=$?
23904   echo "$as_me:23904: \$? = $ac_status" >&5
23905   (exit "$ac_status"); } &&
23906          { ac_try='test -s "conftest.$ac_objext"'
23907   { (eval echo "$as_me:23907: \"$ac_try\"") >&5
23908   (eval $ac_try) 2>&5
23909   ac_status=$?
23910   echo "$as_me:23910: \$? = $ac_status" >&5
23911   (exit "$ac_status"); }; }; then
23912   cf_cv_term_header=$cf_header
23913                          break
23914 else
23915   echo "$as_me: failed program was:" >&5
23916 cat "conftest.$ac_ext" >&5
23917 cf_cv_term_header=no
23918 fi
23919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23920         done
23921         ;;
23922 esac
23923
23924 fi
23925 echo "$as_me:23925: result: $cf_cv_term_header" >&5
23926 echo "${ECHO_T}$cf_cv_term_header" >&6
23927
23928 case "$cf_cv_term_header" in
23929 (term.h)
23930
23931 cat >>confdefs.h <<\EOF
23932 #define HAVE_TERM_H 1
23933 EOF
23934
23935         ;;
23936 (ncurses/term.h)
23937
23938 cat >>confdefs.h <<\EOF
23939 #define HAVE_NCURSES_TERM_H 1
23940 EOF
23941
23942         ;;
23943 (ncursesw/term.h)
23944
23945 cat >>confdefs.h <<\EOF
23946 #define HAVE_NCURSESW_TERM_H 1
23947 EOF
23948
23949         ;;
23950 esac
23951
23952 echo "$as_me:23952: checking return type of signal handlers" >&5
23953 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
23954 if test "${ac_cv_type_signal+set}" = set; then
23955   echo $ECHO_N "(cached) $ECHO_C" >&6
23956 else
23957   cat >"conftest.$ac_ext" <<_ACEOF
23958 #line 23958 "configure"
23959 #include "confdefs.h"
23960 #include <sys/types.h>
23961 #include <signal.h>
23962 #ifdef signal
23963 # undef signal
23964 #endif
23965 #ifdef __cplusplus
23966 extern "C" void (*signal (int, void (*)(int)))(int);
23967 #else
23968 void (*signal ()) ();
23969 #endif
23970
23971 int
23972 main (void)
23973 {
23974 int i;
23975   ;
23976   return 0;
23977 }
23978 _ACEOF
23979 rm -f "conftest.$ac_objext"
23980 if { (eval echo "$as_me:23980: \"$ac_compile\"") >&5
23981   (eval $ac_compile) 2>&5
23982   ac_status=$?
23983   echo "$as_me:23983: \$? = $ac_status" >&5
23984   (exit "$ac_status"); } &&
23985          { ac_try='test -s "conftest.$ac_objext"'
23986   { (eval echo "$as_me:23986: \"$ac_try\"") >&5
23987   (eval $ac_try) 2>&5
23988   ac_status=$?
23989   echo "$as_me:23989: \$? = $ac_status" >&5
23990   (exit "$ac_status"); }; }; then
23991   ac_cv_type_signal=void
23992 else
23993   echo "$as_me: failed program was:" >&5
23994 cat "conftest.$ac_ext" >&5
23995 ac_cv_type_signal=int
23996 fi
23997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23998 fi
23999 echo "$as_me:23999: result: $ac_cv_type_signal" >&5
24000 echo "${ECHO_T}$ac_cv_type_signal" >&6
24001
24002 cat >>confdefs.h <<EOF
24003 #define RETSIGTYPE $ac_cv_type_signal
24004 EOF
24005
24006 for ac_func in \
24007 btowc \
24008 mblen \
24009 mbrlen \
24010 mbrtowc \
24011 mbtowc \
24012 strcasecmp \
24013 strftime \
24014 tsearch \
24015 waitpid \
24016 wcsrtombs \
24017 wcstombs \
24018 wctob \
24019 wctomb \
24020 mktime \
24021
24022 do
24023 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24024 echo "$as_me:24024: checking for $ac_func" >&5
24025 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24026 if eval "test \"\${$as_ac_var+set}\" = set"; then
24027   echo $ECHO_N "(cached) $ECHO_C" >&6
24028 else
24029   cat >"conftest.$ac_ext" <<_ACEOF
24030 #line 24030 "configure"
24031 #include "confdefs.h"
24032 #define $ac_func autoconf_temporary
24033 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
24034 #undef $ac_func
24035
24036 #ifdef __cplusplus
24037 extern "C"
24038 #endif
24039
24040 /* We use char because int might match the return type of a gcc2
24041    builtin and then its argument prototype would still apply.  */
24042 char $ac_func (void);
24043
24044 int
24045 main (void)
24046 {
24047
24048 /* The GNU C library defines stubs for functions which it implements
24049     to always fail with ENOSYS.  Some functions are actually named
24050     something starting with __ and the normal name is an alias.  */
24051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24052 #error found stub for $ac_func
24053 #endif
24054
24055         return $ac_func ();
24056   ;
24057   return 0;
24058 }
24059 _ACEOF
24060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24061 if { (eval echo "$as_me:24061: \"$ac_link\"") >&5
24062   (eval $ac_link) 2>&5
24063   ac_status=$?
24064   echo "$as_me:24064: \$? = $ac_status" >&5
24065   (exit "$ac_status"); } &&
24066          { ac_try='test -s "conftest$ac_exeext"'
24067   { (eval echo "$as_me:24067: \"$ac_try\"") >&5
24068   (eval $ac_try) 2>&5
24069   ac_status=$?
24070   echo "$as_me:24070: \$? = $ac_status" >&5
24071   (exit "$ac_status"); }; }; then
24072   eval "$as_ac_var=yes"
24073 else
24074   echo "$as_me: failed program was:" >&5
24075 cat "conftest.$ac_ext" >&5
24076 eval "$as_ac_var=no"
24077 fi
24078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24079 fi
24080 echo "$as_me:24080: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24081 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24082 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24083   cat >>confdefs.h <<EOF
24084 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24085 EOF
24086
24087 fi
24088 done
24089
24090 echo "$as_me:24090: checking definition to turn on extended curses functions" >&5
24091 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
24092 if test "${cf_cv_need_xopen_extension+set}" = set; then
24093   echo $ECHO_N "(cached) $ECHO_C" >&6
24094 else
24095
24096 cf_cv_need_xopen_extension=unknown
24097 cat >"conftest.$ac_ext" <<_ACEOF
24098 #line 24098 "configure"
24099 #include "confdefs.h"
24100
24101 #include <stdlib.h>
24102 #include <${cf_cv_ncurses_header:-curses.h}>
24103 int
24104 main (void)
24105 {
24106
24107 #if defined(NCURSES_VERSION_PATCH)
24108 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
24109         make an error
24110 #endif
24111 #endif
24112 #ifdef NCURSES_VERSION
24113         cchar_t check;
24114         int check2 = curs_set((int)sizeof(check));
24115 #endif
24116         long x = winnstr(stdscr, "", 0);
24117         int x1, y1;
24118 #ifdef NCURSES_VERSION
24119         (void)check2;
24120 #endif
24121         getbegyx(stdscr, y1, x1);
24122         (void)x;
24123         (void)y1;
24124         (void)x1;
24125
24126   ;
24127   return 0;
24128 }
24129 _ACEOF
24130 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24131 if { (eval echo "$as_me:24131: \"$ac_link\"") >&5
24132   (eval $ac_link) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit "$ac_status"); } &&
24136          { ac_try='test -s "conftest$ac_exeext"'
24137   { (eval echo "$as_me:24137: \"$ac_try\"") >&5
24138   (eval $ac_try) 2>&5
24139   ac_status=$?
24140   echo "$as_me:24140: \$? = $ac_status" >&5
24141   (exit "$ac_status"); }; }; then
24142   cf_cv_need_xopen_extension=none
24143 else
24144   echo "$as_me: failed program was:" >&5
24145 cat "conftest.$ac_ext" >&5
24146
24147         for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
24148         do
24149                 cat >"conftest.$ac_ext" <<_ACEOF
24150 #line 24150 "configure"
24151 #include "confdefs.h"
24152
24153 #define $cf_try_xopen_extension 1
24154 #include <stdlib.h>
24155 #include <${cf_cv_ncurses_header:-curses.h}>
24156 int
24157 main (void)
24158 {
24159
24160 #ifdef NCURSES_VERSION
24161                 cchar_t check;
24162                 int check2 = curs_set((int)sizeof(check));
24163 #endif
24164                 long x = winnstr(stdscr, "", 0);
24165                 int x1, y1;
24166                 getbegyx(stdscr, y1, x1);
24167 #ifdef NCURSES_VERSION
24168                 (void)check2;
24169 #endif
24170                 (void)x;
24171                 (void)y1;
24172                 (void)x1;
24173
24174   ;
24175   return 0;
24176 }
24177 _ACEOF
24178 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24179 if { (eval echo "$as_me:24179: \"$ac_link\"") >&5
24180   (eval $ac_link) 2>&5
24181   ac_status=$?
24182   echo "$as_me:24182: \$? = $ac_status" >&5
24183   (exit "$ac_status"); } &&
24184          { ac_try='test -s "conftest$ac_exeext"'
24185   { (eval echo "$as_me:24185: \"$ac_try\"") >&5
24186   (eval $ac_try) 2>&5
24187   ac_status=$?
24188   echo "$as_me:24188: \$? = $ac_status" >&5
24189   (exit "$ac_status"); }; }; then
24190   cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
24191 else
24192   echo "$as_me: failed program was:" >&5
24193 cat "conftest.$ac_ext" >&5
24194 fi
24195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24196         done
24197
24198 fi
24199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24200
24201 fi
24202 echo "$as_me:24202: result: $cf_cv_need_xopen_extension" >&5
24203 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
24204
24205 case "$cf_cv_need_xopen_extension" in
24206 (*_*)
24207
24208         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24209         CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
24210
24211         ;;
24212 esac
24213
24214 echo "$as_me:24214: checking for unctrl.h" >&5
24215 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
24216 if test "${cf_cv_unctrl_header+set}" = set; then
24217   echo $ECHO_N "(cached) $ECHO_C" >&6
24218 else
24219
24220 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
24221 # for <unctrl.h> if we do not find the variant.
24222
24223 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
24224
24225 case "${cf_cv_ncurses_header:-curses.h}" in
24226 (*/*)
24227         cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
24228         cf_header_list="$cf_header_item $cf_header_list"
24229         ;;
24230 esac
24231
24232 for cf_header in $cf_header_list
24233 do
24234         cat >"conftest.$ac_ext" <<_ACEOF
24235 #line 24235 "configure"
24236 #include "confdefs.h"
24237
24238 #include <${cf_cv_ncurses_header:-curses.h}>
24239 #include <${cf_header}>
24240 int
24241 main (void)
24242 {
24243 WINDOW *x; (void)x
24244   ;
24245   return 0;
24246 }
24247 _ACEOF
24248 rm -f "conftest.$ac_objext"
24249 if { (eval echo "$as_me:24249: \"$ac_compile\"") >&5
24250   (eval $ac_compile) 2>&5
24251   ac_status=$?
24252   echo "$as_me:24252: \$? = $ac_status" >&5
24253   (exit "$ac_status"); } &&
24254          { ac_try='test -s "conftest.$ac_objext"'
24255   { (eval echo "$as_me:24255: \"$ac_try\"") >&5
24256   (eval $ac_try) 2>&5
24257   ac_status=$?
24258   echo "$as_me:24258: \$? = $ac_status" >&5
24259   (exit "$ac_status"); }; }; then
24260   cf_cv_unctrl_header=$cf_header
24261          break
24262 else
24263   echo "$as_me: failed program was:" >&5
24264 cat "conftest.$ac_ext" >&5
24265 cf_cv_unctrl_header=no
24266 fi
24267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24268 done
24269
24270 fi
24271 echo "$as_me:24271: result: $cf_cv_unctrl_header" >&5
24272 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
24273
24274 case "$cf_cv_unctrl_header" in
24275 (no)
24276         { echo "$as_me:24276: WARNING: unctrl.h header not found" >&5
24277 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
24278         ;;
24279 esac
24280
24281 case "$cf_cv_unctrl_header" in
24282 (unctrl.h)
24283
24284 cat >>confdefs.h <<\EOF
24285 #define HAVE_UNCTRL_H 1
24286 EOF
24287
24288         ;;
24289 (ncurses/unctrl.h)
24290
24291 cat >>confdefs.h <<\EOF
24292 #define HAVE_NCURSES_UNCTRL_H 1
24293 EOF
24294
24295         ;;
24296 (ncursesw/unctrl.h)
24297
24298 cat >>confdefs.h <<\EOF
24299 #define HAVE_NCURSESW_UNCTRL_H 1
24300 EOF
24301
24302         ;;
24303 esac
24304
24305 for cf_func in \
24306 flushinp \
24307 getattrs \
24308 getbegx \
24309 getbegy \
24310 getbegyx \
24311 getcurx \
24312 getcury \
24313 getmaxx \
24314 getmaxy \
24315 getmaxyx \
24316 getparx \
24317 getpary \
24318 getparyx \
24319 use_default_colors \
24320 wchgat \
24321 wcursyncup \
24322 wget_wch \
24323 wsyncup \
24324
24325 do
24326
24327 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24328
24329         echo "$as_me:24329: checking for ${cf_func}" >&5
24330 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24331
24332 echo "${as_me:-configure}:24332: testing ${cf_func} ..." 1>&5
24333
24334         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24335   echo $ECHO_N "(cached) $ECHO_C" >&6
24336 else
24337
24338                 eval cf_result='$ac_cv_func_'$cf_func
24339                 if test ".$cf_result" != ".no"; then
24340                         cat >"conftest.$ac_ext" <<_ACEOF
24341 #line 24341 "configure"
24342 #include "confdefs.h"
24343
24344 #ifdef HAVE_XCURSES
24345 #include <xcurses.h>
24346 char * XCursesProgramName = "test";
24347 #else
24348 #include <${cf_cv_ncurses_header:-curses.h}>
24349 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24350 #include <ncursesw/term.h>
24351 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24352 #include <ncurses/term.h>
24353 #elif defined(HAVE_TERM_H)
24354 #include <term.h>
24355 #endif
24356 #endif
24357
24358 int
24359 main (void)
24360 {
24361
24362 #ifndef ${cf_func}
24363 long foo = (long)(&${cf_func});
24364 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24365 if (foo + 1234L > 5678L)
24366         ${cf_cv_main_return:-return}(foo != 0);
24367 #endif
24368
24369   ;
24370   return 0;
24371 }
24372 _ACEOF
24373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24374 if { (eval echo "$as_me:24374: \"$ac_link\"") >&5
24375   (eval $ac_link) 2>&5
24376   ac_status=$?
24377   echo "$as_me:24377: \$? = $ac_status" >&5
24378   (exit "$ac_status"); } &&
24379          { ac_try='test -s "conftest$ac_exeext"'
24380   { (eval echo "$as_me:24380: \"$ac_try\"") >&5
24381   (eval $ac_try) 2>&5
24382   ac_status=$?
24383   echo "$as_me:24383: \$? = $ac_status" >&5
24384   (exit "$ac_status"); }; }; then
24385   cf_result=yes
24386 else
24387   echo "$as_me: failed program was:" >&5
24388 cat "conftest.$ac_ext" >&5
24389 cf_result=no
24390 fi
24391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24392                 fi
24393                 eval 'cf_cv_func_'$cf_func'="$cf_result"'
24394
24395 fi
24396
24397         # use the computed/retrieved cache-value:
24398         eval 'cf_result=$cf_cv_func_'$cf_func
24399         echo "$as_me:24399: result: $cf_result" >&5
24400 echo "${ECHO_T}$cf_result" >&6
24401         if test "$cf_result" != no; then
24402                 cat >>confdefs.h <<EOF
24403 #define HAVE_${cf_tr_func} 1
24404 EOF
24405
24406         fi
24407 done
24408
24409 for cf_func in \
24410 curses_exit \
24411 _nc_free_and_exit \
24412
24413 do
24414
24415 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24416
24417         echo "$as_me:24417: checking for ${cf_func}" >&5
24418 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24419
24420 echo "${as_me:-configure}:24420: testing ${cf_func} ..." 1>&5
24421
24422         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24423   echo $ECHO_N "(cached) $ECHO_C" >&6
24424 else
24425
24426                 eval cf_result='$ac_cv_func_'$cf_func
24427                 if test ".$cf_result" != ".no"; then
24428                         cat >"conftest.$ac_ext" <<_ACEOF
24429 #line 24429 "configure"
24430 #include "confdefs.h"
24431
24432 #ifdef HAVE_XCURSES
24433 #include <xcurses.h>
24434 char * XCursesProgramName = "test";
24435 #else
24436 #include <${cf_cv_ncurses_header:-curses.h}>
24437 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24438 #include <ncursesw/term.h>
24439 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24440 #include <ncurses/term.h>
24441 #elif defined(HAVE_TERM_H)
24442 #include <term.h>
24443 #endif
24444 #endif
24445
24446 int
24447 main (void)
24448 {
24449
24450 #ifndef ${cf_func}
24451 long foo = (long)(&${cf_func});
24452 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24453 if (foo + 1234L > 5678L)
24454         ${cf_cv_main_return:-return}(foo != 0);
24455 #endif
24456
24457   ;
24458   return 0;
24459 }
24460 _ACEOF
24461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24462 if { (eval echo "$as_me:24462: \"$ac_link\"") >&5
24463   (eval $ac_link) 2>&5
24464   ac_status=$?
24465   echo "$as_me:24465: \$? = $ac_status" >&5
24466   (exit "$ac_status"); } &&
24467          { ac_try='test -s "conftest$ac_exeext"'
24468   { (eval echo "$as_me:24468: \"$ac_try\"") >&5
24469   (eval $ac_try) 2>&5
24470   ac_status=$?
24471   echo "$as_me:24471: \$? = $ac_status" >&5
24472   (exit "$ac_status"); }; }; then
24473   cf_result=yes
24474 else
24475   echo "$as_me: failed program was:" >&5
24476 cat "conftest.$ac_ext" >&5
24477 cf_result=no
24478 fi
24479 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24480                 fi
24481                 eval 'cf_cv_func_'$cf_func'="$cf_result"'
24482
24483 fi
24484
24485         # use the computed/retrieved cache-value:
24486         eval 'cf_result=$cf_cv_func_'$cf_func
24487         echo "$as_me:24487: result: $cf_result" >&5
24488 echo "${ECHO_T}$cf_result" >&6
24489         if test "$cf_result" != no; then
24490                 cat >>confdefs.h <<EOF
24491 #define HAVE_${cf_tr_func} 1
24492 EOF
24493
24494         fi
24495 done
24496
24497 echo "$as_me:24497: checking for start_color" >&5
24498 echo $ECHO_N "checking for start_color... $ECHO_C" >&6
24499 if test "${ac_cv_func_start_color+set}" = set; then
24500   echo $ECHO_N "(cached) $ECHO_C" >&6
24501 else
24502   cat >"conftest.$ac_ext" <<_ACEOF
24503 #line 24503 "configure"
24504 #include "confdefs.h"
24505 #define start_color autoconf_temporary
24506 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
24507 #undef start_color
24508
24509 #ifdef __cplusplus
24510 extern "C"
24511 #endif
24512
24513 /* We use char because int might match the return type of a gcc2
24514    builtin and then its argument prototype would still apply.  */
24515 char start_color (void);
24516
24517 int
24518 main (void)
24519 {
24520
24521 /* The GNU C library defines stubs for functions which it implements
24522     to always fail with ENOSYS.  Some functions are actually named
24523     something starting with __ and the normal name is an alias.  */
24524 #if defined (__stub_start_color) || defined (__stub___start_color)
24525 #error found stub for start_color
24526 #endif
24527
24528         return start_color ();
24529   ;
24530   return 0;
24531 }
24532 _ACEOF
24533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24534 if { (eval echo "$as_me:24534: \"$ac_link\"") >&5
24535   (eval $ac_link) 2>&5
24536   ac_status=$?
24537   echo "$as_me:24537: \$? = $ac_status" >&5
24538   (exit "$ac_status"); } &&
24539          { ac_try='test -s "conftest$ac_exeext"'
24540   { (eval echo "$as_me:24540: \"$ac_try\"") >&5
24541   (eval $ac_try) 2>&5
24542   ac_status=$?
24543   echo "$as_me:24543: \$? = $ac_status" >&5
24544   (exit "$ac_status"); }; }; then
24545   ac_cv_func_start_color=yes
24546 else
24547   echo "$as_me: failed program was:" >&5
24548 cat "conftest.$ac_ext" >&5
24549 ac_cv_func_start_color=no
24550 fi
24551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24552 fi
24553 echo "$as_me:24553: result: $ac_cv_func_start_color" >&5
24554 echo "${ECHO_T}$ac_cv_func_start_color" >&6
24555 if test "$ac_cv_func_start_color" = yes; then
24556
24557 cat >>confdefs.h <<\EOF
24558 #define HAVE_COLOR 1
24559 EOF
24560
24561 fi
24562
24563 echo "$as_me:24563: checking for chtype typedef" >&5
24564 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
24565 if test "${cf_cv_chtype_decl+set}" = set; then
24566   echo $ECHO_N "(cached) $ECHO_C" >&6
24567 else
24568
24569         cat >"conftest.$ac_ext" <<_ACEOF
24570 #line 24570 "configure"
24571 #include "confdefs.h"
24572 #include <${cf_cv_ncurses_header:-curses.h}>
24573 int
24574 main (void)
24575 {
24576 chtype foo; (void)foo
24577   ;
24578   return 0;
24579 }
24580 _ACEOF
24581 rm -f "conftest.$ac_objext"
24582 if { (eval echo "$as_me:24582: \"$ac_compile\"") >&5
24583   (eval $ac_compile) 2>&5
24584   ac_status=$?
24585   echo "$as_me:24585: \$? = $ac_status" >&5
24586   (exit "$ac_status"); } &&
24587          { ac_try='test -s "conftest.$ac_objext"'
24588   { (eval echo "$as_me:24588: \"$ac_try\"") >&5
24589   (eval $ac_try) 2>&5
24590   ac_status=$?
24591   echo "$as_me:24591: \$? = $ac_status" >&5
24592   (exit "$ac_status"); }; }; then
24593   cf_cv_chtype_decl=yes
24594 else
24595   echo "$as_me: failed program was:" >&5
24596 cat "conftest.$ac_ext" >&5
24597 cf_cv_chtype_decl=no
24598 fi
24599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24600 fi
24601 echo "$as_me:24601: result: $cf_cv_chtype_decl" >&5
24602 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
24603 if test "$cf_cv_chtype_decl" = yes ; then
24604
24605 cat >>confdefs.h <<\EOF
24606 #define HAVE_TYPE_CHTYPE 1
24607 EOF
24608
24609         echo "$as_me:24609: checking if chtype is scalar or struct" >&5
24610 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
24611 if test "${cf_cv_chtype_type+set}" = set; then
24612   echo $ECHO_N "(cached) $ECHO_C" >&6
24613 else
24614
24615                 cat >"conftest.$ac_ext" <<_ACEOF
24616 #line 24616 "configure"
24617 #include "confdefs.h"
24618 #include <${cf_cv_ncurses_header:-curses.h}>
24619 int
24620 main (void)
24621 {
24622 static chtype foo; long x = foo; (void)x
24623   ;
24624   return 0;
24625 }
24626 _ACEOF
24627 rm -f "conftest.$ac_objext"
24628 if { (eval echo "$as_me:24628: \"$ac_compile\"") >&5
24629   (eval $ac_compile) 2>&5
24630   ac_status=$?
24631   echo "$as_me:24631: \$? = $ac_status" >&5
24632   (exit "$ac_status"); } &&
24633          { ac_try='test -s "conftest.$ac_objext"'
24634   { (eval echo "$as_me:24634: \"$ac_try\"") >&5
24635   (eval $ac_try) 2>&5
24636   ac_status=$?
24637   echo "$as_me:24637: \$? = $ac_status" >&5
24638   (exit "$ac_status"); }; }; then
24639   cf_cv_chtype_type=scalar
24640 else
24641   echo "$as_me: failed program was:" >&5
24642 cat "conftest.$ac_ext" >&5
24643 cf_cv_chtype_type=struct
24644 fi
24645 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24646 fi
24647 echo "$as_me:24647: result: $cf_cv_chtype_type" >&5
24648 echo "${ECHO_T}$cf_cv_chtype_type" >&6
24649         if test "$cf_cv_chtype_type" = scalar ; then
24650
24651 cat >>confdefs.h <<\EOF
24652 #define TYPE_CHTYPE_IS_SCALAR 1
24653 EOF
24654
24655         fi
24656 fi
24657
24658 echo "$as_me:24658: checking for wide alternate character set array" >&5
24659 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
24660 if test "${cf_cv_curses_wacs_map+set}" = set; then
24661   echo $ECHO_N "(cached) $ECHO_C" >&6
24662 else
24663
24664         cf_cv_curses_wacs_map=unknown
24665         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
24666         do
24667         cat >"conftest.$ac_ext" <<_ACEOF
24668 #line 24668 "configure"
24669 #include "confdefs.h"
24670
24671 #ifndef _XOPEN_SOURCE_EXTENDED
24672 #define _XOPEN_SOURCE_EXTENDED
24673 #endif
24674 #include <${cf_cv_ncurses_header:-curses.h}>
24675 int
24676 main (void)
24677 {
24678 void *foo = &(${name}['k']); (void)foo
24679   ;
24680   return 0;
24681 }
24682 _ACEOF
24683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24684 if { (eval echo "$as_me:24684: \"$ac_link\"") >&5
24685   (eval $ac_link) 2>&5
24686   ac_status=$?
24687   echo "$as_me:24687: \$? = $ac_status" >&5
24688   (exit "$ac_status"); } &&
24689          { ac_try='test -s "conftest$ac_exeext"'
24690   { (eval echo "$as_me:24690: \"$ac_try\"") >&5
24691   (eval $ac_try) 2>&5
24692   ac_status=$?
24693   echo "$as_me:24693: \$? = $ac_status" >&5
24694   (exit "$ac_status"); }; }; then
24695   cf_cv_curses_wacs_map=$name
24696          break
24697 else
24698   echo "$as_me: failed program was:" >&5
24699 cat "conftest.$ac_ext" >&5
24700 fi
24701 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24702         done
24703 fi
24704 echo "$as_me:24704: result: $cf_cv_curses_wacs_map" >&5
24705 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
24706
24707 test "$cf_cv_curses_wacs_map" != unknown &&
24708 cat >>confdefs.h <<EOF
24709 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
24710 EOF
24711
24712 echo "$as_me:24712: checking for wide alternate character constants" >&5
24713 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
24714 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
24715   echo $ECHO_N "(cached) $ECHO_C" >&6
24716 else
24717
24718 cf_cv_curses_wacs_symbols=no
24719 if test "$cf_cv_curses_wacs_map" != unknown
24720 then
24721         cat >"conftest.$ac_ext" <<_ACEOF
24722 #line 24722 "configure"
24723 #include "confdefs.h"
24724
24725 #ifndef _XOPEN_SOURCE_EXTENDED
24726 #define _XOPEN_SOURCE_EXTENDED
24727 #endif
24728 #include <${cf_cv_ncurses_header:-curses.h}>
24729 int
24730 main (void)
24731 {
24732 cchar_t *foo = WACS_PLUS;
24733          ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
24734   ;
24735   return 0;
24736 }
24737 _ACEOF
24738 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24739 if { (eval echo "$as_me:24739: \"$ac_link\"") >&5
24740   (eval $ac_link) 2>&5
24741   ac_status=$?
24742   echo "$as_me:24742: \$? = $ac_status" >&5
24743   (exit "$ac_status"); } &&
24744          { ac_try='test -s "conftest$ac_exeext"'
24745   { (eval echo "$as_me:24745: \"$ac_try\"") >&5
24746   (eval $ac_try) 2>&5
24747   ac_status=$?
24748   echo "$as_me:24748: \$? = $ac_status" >&5
24749   (exit "$ac_status"); }; }; then
24750   cf_cv_curses_wacs_symbols=yes
24751 else
24752   echo "$as_me: failed program was:" >&5
24753 cat "conftest.$ac_ext" >&5
24754 fi
24755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24756 else
24757         cat >"conftest.$ac_ext" <<_ACEOF
24758 #line 24758 "configure"
24759 #include "confdefs.h"
24760
24761 #ifndef _XOPEN_SOURCE_EXTENDED
24762 #define _XOPEN_SOURCE_EXTENDED
24763 #endif
24764 #include <${cf_cv_ncurses_header:-curses.h}>
24765 int
24766 main (void)
24767 {
24768 cchar_t *foo = WACS_PLUS; (void)foo
24769   ;
24770   return 0;
24771 }
24772 _ACEOF
24773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24774 if { (eval echo "$as_me:24774: \"$ac_link\"") >&5
24775   (eval $ac_link) 2>&5
24776   ac_status=$?
24777   echo "$as_me:24777: \$? = $ac_status" >&5
24778   (exit "$ac_status"); } &&
24779          { ac_try='test -s "conftest$ac_exeext"'
24780   { (eval echo "$as_me:24780: \"$ac_try\"") >&5
24781   (eval $ac_try) 2>&5
24782   ac_status=$?
24783   echo "$as_me:24783: \$? = $ac_status" >&5
24784   (exit "$ac_status"); }; }; then
24785   cf_cv_curses_wacs_symbols=yes
24786 else
24787   echo "$as_me: failed program was:" >&5
24788 cat "conftest.$ac_ext" >&5
24789 fi
24790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24791 fi
24792
24793 fi
24794 echo "$as_me:24794: result: $cf_cv_curses_wacs_symbols" >&5
24795 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
24796
24797 test "$cf_cv_curses_wacs_symbols" != no &&
24798 cat >>confdefs.h <<\EOF
24799 #define CURSES_WACS_SYMBOLS 1
24800 EOF
24801
24802 for cf_func in wgetparent
24803 do
24804
24805 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24806
24807         echo "$as_me:24807: checking for ${cf_func}" >&5
24808 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24809
24810 echo "${as_me:-configure}:24810: testing ${cf_func} ..." 1>&5
24811
24812         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24813   echo $ECHO_N "(cached) $ECHO_C" >&6
24814 else
24815
24816                 eval cf_result='$ac_cv_func_'$cf_func
24817                 if test ".$cf_result" != ".no"; then
24818                         cat >"conftest.$ac_ext" <<_ACEOF
24819 #line 24819 "configure"
24820 #include "confdefs.h"
24821
24822 #ifdef HAVE_XCURSES
24823 #include <xcurses.h>
24824 char * XCursesProgramName = "test";
24825 #else
24826 #include <${cf_cv_ncurses_header:-curses.h}>
24827 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24828 #include <ncursesw/term.h>
24829 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24830 #include <ncurses/term.h>
24831 #elif defined(HAVE_TERM_H)
24832 #include <term.h>
24833 #endif
24834 #endif
24835
24836 int
24837 main (void)
24838 {
24839
24840 #ifndef ${cf_func}
24841 long foo = (long)(&${cf_func});
24842 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24843 if (foo + 1234L > 5678L)
24844         ${cf_cv_main_return:-return}(foo != 0);
24845 #endif
24846
24847   ;
24848   return 0;
24849 }
24850 _ACEOF
24851 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24852 if { (eval echo "$as_me:24852: \"$ac_link\"") >&5
24853   (eval $ac_link) 2>&5
24854   ac_status=$?
24855   echo "$as_me:24855: \$? = $ac_status" >&5
24856   (exit "$ac_status"); } &&
24857          { ac_try='test -s "conftest$ac_exeext"'
24858   { (eval echo "$as_me:24858: \"$ac_try\"") >&5
24859   (eval $ac_try) 2>&5
24860   ac_status=$?
24861   echo "$as_me:24861: \$? = $ac_status" >&5
24862   (exit "$ac_status"); }; }; then
24863   cf_result=yes
24864 else
24865   echo "$as_me: failed program was:" >&5
24866 cat "conftest.$ac_ext" >&5
24867 cf_result=no
24868 fi
24869 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24870                 fi
24871                 eval 'cf_cv_func_'$cf_func'="$cf_result"'
24872
24873 fi
24874
24875         # use the computed/retrieved cache-value:
24876         eval 'cf_result=$cf_cv_func_'$cf_func
24877         echo "$as_me:24877: result: $cf_result" >&5
24878 echo "${ECHO_T}$cf_result" >&6
24879         if test "$cf_result" != no; then
24880                 cat >>confdefs.h <<EOF
24881 #define HAVE_${cf_tr_func} 1
24882 EOF
24883
24884         fi
24885 done
24886
24887 if test "x$cf_cv_func_wgetparent" != xyes
24888 then
24889         echo "$as_me:24889: checking if WINDOW has _parent member" >&5
24890 echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
24891         cat >"conftest.$ac_ext" <<_ACEOF
24892 #line 24892 "configure"
24893 #include "confdefs.h"
24894 #include <${cf_cv_ncurses_header:-curses.h}>
24895 int
24896 main (void)
24897 {
24898 WINDOW *p = stdscr->_parent; (void)p
24899   ;
24900   return 0;
24901 }
24902 _ACEOF
24903 rm -f "conftest.$ac_objext"
24904 if { (eval echo "$as_me:24904: \"$ac_compile\"") >&5
24905   (eval $ac_compile) 2>&5
24906   ac_status=$?
24907   echo "$as_me:24907: \$? = $ac_status" >&5
24908   (exit "$ac_status"); } &&
24909          { ac_try='test -s "conftest.$ac_objext"'
24910   { (eval echo "$as_me:24910: \"$ac_try\"") >&5
24911   (eval $ac_try) 2>&5
24912   ac_status=$?
24913   echo "$as_me:24913: \$? = $ac_status" >&5
24914   (exit "$ac_status"); }; }; then
24915   cf_window__parent=yes
24916 else
24917   echo "$as_me: failed program was:" >&5
24918 cat "conftest.$ac_ext" >&5
24919 cf_window__parent=no
24920 fi
24921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24922         echo "$as_me:24922: result: $cf_window__parent" >&5
24923 echo "${ECHO_T}$cf_window__parent" >&6
24924         if test "$cf_window__parent" = yes
24925         then
24926
24927 cat >>confdefs.h <<\EOF
24928 #define HAVE_WINDOW__PARENT 1
24929 EOF
24930
24931         fi
24932 fi
24933
24934 for ac_header in sys/wait.h
24935 do
24936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24937 echo "$as_me:24937: checking for $ac_header" >&5
24938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24940   echo $ECHO_N "(cached) $ECHO_C" >&6
24941 else
24942   cat >"conftest.$ac_ext" <<_ACEOF
24943 #line 24943 "configure"
24944 #include "confdefs.h"
24945 #include <$ac_header>
24946 _ACEOF
24947 if { (eval echo "$as_me:24947: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24948   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24949   ac_status=$?
24950   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24951   rm -f conftest.er1
24952   cat conftest.err >&5
24953   echo "$as_me:24953: \$? = $ac_status" >&5
24954   (exit "$ac_status"); } >/dev/null; then
24955   if test -s conftest.err; then
24956     ac_cpp_err=$ac_c_preproc_warn_flag
24957   else
24958     ac_cpp_err=
24959   fi
24960 else
24961   ac_cpp_err=yes
24962 fi
24963 if test -z "$ac_cpp_err"; then
24964   eval "$as_ac_Header=yes"
24965 else
24966   echo "$as_me: failed program was:" >&5
24967   cat "conftest.$ac_ext" >&5
24968   eval "$as_ac_Header=no"
24969 fi
24970 rm -f conftest.err "conftest.$ac_ext"
24971 fi
24972 echo "$as_me:24972: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24973 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24974 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24975   cat >>confdefs.h <<EOF
24976 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24977 EOF
24978
24979 fi
24980 done
24981
24982 cf_wait_headers="#include <sys/types.h>
24983 "
24984 if test "$ac_cv_header_sys_wait_h" = yes; then
24985 cf_wait_headers="$cf_wait_headers
24986 #include <sys/wait.h>
24987 "
24988 else
24989
24990 for ac_header in wait.h
24991 do
24992 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24993 echo "$as_me:24993: checking for $ac_header" >&5
24994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24996   echo $ECHO_N "(cached) $ECHO_C" >&6
24997 else
24998   cat >"conftest.$ac_ext" <<_ACEOF
24999 #line 24999 "configure"
25000 #include "confdefs.h"
25001 #include <$ac_header>
25002 _ACEOF
25003 if { (eval echo "$as_me:25003: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25004   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25005   ac_status=$?
25006   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25007   rm -f conftest.er1
25008   cat conftest.err >&5
25009   echo "$as_me:25009: \$? = $ac_status" >&5
25010   (exit "$ac_status"); } >/dev/null; then
25011   if test -s conftest.err; then
25012     ac_cpp_err=$ac_c_preproc_warn_flag
25013   else
25014     ac_cpp_err=
25015   fi
25016 else
25017   ac_cpp_err=yes
25018 fi
25019 if test -z "$ac_cpp_err"; then
25020   eval "$as_ac_Header=yes"
25021 else
25022   echo "$as_me: failed program was:" >&5
25023   cat "conftest.$ac_ext" >&5
25024   eval "$as_ac_Header=no"
25025 fi
25026 rm -f conftest.err "conftest.$ac_ext"
25027 fi
25028 echo "$as_me:25028: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25029 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25030 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25031   cat >>confdefs.h <<EOF
25032 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25033 EOF
25034
25035 fi
25036 done
25037
25038 for ac_header in waitstatus.h
25039 do
25040 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25041 echo "$as_me:25041: checking for $ac_header" >&5
25042 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25043 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25044   echo $ECHO_N "(cached) $ECHO_C" >&6
25045 else
25046   cat >"conftest.$ac_ext" <<_ACEOF
25047 #line 25047 "configure"
25048 #include "confdefs.h"
25049 #include <$ac_header>
25050 _ACEOF
25051 if { (eval echo "$as_me:25051: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25052   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25053   ac_status=$?
25054   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25055   rm -f conftest.er1
25056   cat conftest.err >&5
25057   echo "$as_me:25057: \$? = $ac_status" >&5
25058   (exit "$ac_status"); } >/dev/null; then
25059   if test -s conftest.err; then
25060     ac_cpp_err=$ac_c_preproc_warn_flag
25061   else
25062     ac_cpp_err=
25063   fi
25064 else
25065   ac_cpp_err=yes
25066 fi
25067 if test -z "$ac_cpp_err"; then
25068   eval "$as_ac_Header=yes"
25069 else
25070   echo "$as_me: failed program was:" >&5
25071   cat "conftest.$ac_ext" >&5
25072   eval "$as_ac_Header=no"
25073 fi
25074 rm -f conftest.err "conftest.$ac_ext"
25075 fi
25076 echo "$as_me:25076: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25077 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25078 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25079   cat >>confdefs.h <<EOF
25080 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25081 EOF
25082
25083 fi
25084 done
25085
25086 if test "$ac_cv_header_wait_h" = yes; then
25087 cf_wait_headers="$cf_wait_headers
25088 #include <wait.h>
25089 "
25090 fi
25091 if test "$ac_cv_header_waitstatus_h" = yes; then
25092 cf_wait_headers="$cf_wait_headers
25093 #include <waitstatus.h>
25094 "
25095 fi
25096 fi
25097
25098 echo "$as_me:25098: checking for union wait" >&5
25099 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
25100 if test "${cf_cv_type_unionwait+set}" = set; then
25101   echo $ECHO_N "(cached) $ECHO_C" >&6
25102 else
25103
25104         cat >"conftest.$ac_ext" <<_ACEOF
25105 #line 25105 "configure"
25106 #include "confdefs.h"
25107 $cf_wait_headers
25108 int
25109 main (void)
25110 {
25111 int x;
25112          int y = WEXITSTATUS(x);
25113          int z = WTERMSIG(x);
25114          wait(&x);
25115          (void)x;
25116          (void)y;
25117          (void)z;
25118
25119   ;
25120   return 0;
25121 }
25122 _ACEOF
25123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25124 if { (eval echo "$as_me:25124: \"$ac_link\"") >&5
25125   (eval $ac_link) 2>&5
25126   ac_status=$?
25127   echo "$as_me:25127: \$? = $ac_status" >&5
25128   (exit "$ac_status"); } &&
25129          { ac_try='test -s "conftest$ac_exeext"'
25130   { (eval echo "$as_me:25130: \"$ac_try\"") >&5
25131   (eval $ac_try) 2>&5
25132   ac_status=$?
25133   echo "$as_me:25133: \$? = $ac_status" >&5
25134   (exit "$ac_status"); }; }; then
25135   cf_cv_type_unionwait=no
25136          echo compiles ok w/o union wait 1>&5
25137
25138 else
25139   echo "$as_me: failed program was:" >&5
25140 cat "conftest.$ac_ext" >&5
25141
25142         cat >"conftest.$ac_ext" <<_ACEOF
25143 #line 25143 "configure"
25144 #include "confdefs.h"
25145 $cf_wait_headers
25146 int
25147 main (void)
25148 {
25149 union wait x;
25150 #ifdef WEXITSTATUS
25151          int y = WEXITSTATUS(x);
25152 #endif
25153 #ifdef WTERMSIG
25154          int z = WTERMSIG(x);
25155 #endif
25156          wait(&x);
25157          (void)x;
25158 #ifdef WEXITSTATUS
25159          (void)y;
25160 #endif
25161 #ifdef WTERMSIG
25162          (void)z;
25163 #endif
25164
25165   ;
25166   return 0;
25167 }
25168 _ACEOF
25169 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25170 if { (eval echo "$as_me:25170: \"$ac_link\"") >&5
25171   (eval $ac_link) 2>&5
25172   ac_status=$?
25173   echo "$as_me:25173: \$? = $ac_status" >&5
25174   (exit "$ac_status"); } &&
25175          { ac_try='test -s "conftest$ac_exeext"'
25176   { (eval echo "$as_me:25176: \"$ac_try\"") >&5
25177   (eval $ac_try) 2>&5
25178   ac_status=$?
25179   echo "$as_me:25179: \$? = $ac_status" >&5
25180   (exit "$ac_status"); }; }; then
25181   cf_cv_type_unionwait=yes
25182          echo compiles ok with union wait and possibly macros too 1>&5
25183
25184 else
25185   echo "$as_me: failed program was:" >&5
25186 cat "conftest.$ac_ext" >&5
25187 cf_cv_type_unionwait=no
25188 fi
25189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25190 fi
25191 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25192 fi
25193
25194 echo "$as_me:25194: result: $cf_cv_type_unionwait" >&5
25195 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
25196 test "$cf_cv_type_unionwait" = yes &&
25197 cat >>confdefs.h <<\EOF
25198 #define HAVE_TYPE_UNIONWAIT 1
25199 EOF
25200
25201 if test "$cf_cv_type_unionwait" = yes; then
25202
25203         echo "$as_me:25203: checking if union wait can be used as wait-arg" >&5
25204 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
25205         if test "${cf_cv_arg_union_wait+set}" = set; then
25206   echo $ECHO_N "(cached) $ECHO_C" >&6
25207 else
25208
25209                 cat >"conftest.$ac_ext" <<_ACEOF
25210 #line 25210 "configure"
25211 #include "confdefs.h"
25212 $cf_wait_headers
25213 int
25214 main (void)
25215 {
25216 union wait x; wait(&x)
25217   ;
25218   return 0;
25219 }
25220 _ACEOF
25221 rm -f "conftest.$ac_objext"
25222 if { (eval echo "$as_me:25222: \"$ac_compile\"") >&5
25223   (eval $ac_compile) 2>&5
25224   ac_status=$?
25225   echo "$as_me:25225: \$? = $ac_status" >&5
25226   (exit "$ac_status"); } &&
25227          { ac_try='test -s "conftest.$ac_objext"'
25228   { (eval echo "$as_me:25228: \"$ac_try\"") >&5
25229   (eval $ac_try) 2>&5
25230   ac_status=$?
25231   echo "$as_me:25231: \$? = $ac_status" >&5
25232   (exit "$ac_status"); }; }; then
25233   cf_cv_arg_union_wait=yes
25234 else
25235   echo "$as_me: failed program was:" >&5
25236 cat "conftest.$ac_ext" >&5
25237 cf_cv_arg_union_wait=no
25238 fi
25239 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25240
25241 fi
25242
25243         echo "$as_me:25243: result: $cf_cv_arg_union_wait" >&5
25244 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
25245         test "$cf_cv_arg_union_wait" = yes &&
25246 cat >>confdefs.h <<\EOF
25247 #define WAIT_USES_UNION 1
25248 EOF
25249
25250         echo "$as_me:25250: checking if union wait can be used as waitpid-arg" >&5
25251 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
25252         if test "${cf_cv_arg_union_waitpid+set}" = set; then
25253   echo $ECHO_N "(cached) $ECHO_C" >&6
25254 else
25255
25256                 cat >"conftest.$ac_ext" <<_ACEOF
25257 #line 25257 "configure"
25258 #include "confdefs.h"
25259 $cf_wait_headers
25260 int
25261 main (void)
25262 {
25263 union wait x; waitpid(0, &x, 0)
25264   ;
25265   return 0;
25266 }
25267 _ACEOF
25268 rm -f "conftest.$ac_objext"
25269 if { (eval echo "$as_me:25269: \"$ac_compile\"") >&5
25270   (eval $ac_compile) 2>&5
25271   ac_status=$?
25272   echo "$as_me:25272: \$? = $ac_status" >&5
25273   (exit "$ac_status"); } &&
25274          { ac_try='test -s "conftest.$ac_objext"'
25275   { (eval echo "$as_me:25275: \"$ac_try\"") >&5
25276   (eval $ac_try) 2>&5
25277   ac_status=$?
25278   echo "$as_me:25278: \$? = $ac_status" >&5
25279   (exit "$ac_status"); }; }; then
25280   cf_cv_arg_union_waitpid=yes
25281 else
25282   echo "$as_me: failed program was:" >&5
25283 cat "conftest.$ac_ext" >&5
25284 cf_cv_arg_union_waitpid=no
25285 fi
25286 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25287
25288 fi
25289
25290         echo "$as_me:25290: result: $cf_cv_arg_union_waitpid" >&5
25291 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
25292         test "$cf_cv_arg_union_waitpid" = yes &&
25293 cat >>confdefs.h <<\EOF
25294 #define WAITPID_USES_UNION 1
25295 EOF
25296
25297 fi
25298
25299 echo "$as_me:25299: checking if we must include wchar.h to declare mbstate_t" >&5
25300 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
25301 if test "${cf_cv_mbstate_t+set}" = set; then
25302   echo $ECHO_N "(cached) $ECHO_C" >&6
25303 else
25304
25305 cat >"conftest.$ac_ext" <<_ACEOF
25306 #line 25306 "configure"
25307 #include "confdefs.h"
25308
25309 #include <stdlib.h>
25310 #include <stdio.h>
25311 #ifdef HAVE_LIBUTF8_H
25312 #include <libutf8.h>
25313 #endif
25314 int
25315 main (void)
25316 {
25317 mbstate_t state; (void)state
25318   ;
25319   return 0;
25320 }
25321 _ACEOF
25322 rm -f "conftest.$ac_objext"
25323 if { (eval echo "$as_me:25323: \"$ac_compile\"") >&5
25324   (eval $ac_compile) 2>&5
25325   ac_status=$?
25326   echo "$as_me:25326: \$? = $ac_status" >&5
25327   (exit "$ac_status"); } &&
25328          { ac_try='test -s "conftest.$ac_objext"'
25329   { (eval echo "$as_me:25329: \"$ac_try\"") >&5
25330   (eval $ac_try) 2>&5
25331   ac_status=$?
25332   echo "$as_me:25332: \$? = $ac_status" >&5
25333   (exit "$ac_status"); }; }; then
25334   cf_cv_mbstate_t=no
25335 else
25336   echo "$as_me: failed program was:" >&5
25337 cat "conftest.$ac_ext" >&5
25338 cat >"conftest.$ac_ext" <<_ACEOF
25339 #line 25339 "configure"
25340 #include "confdefs.h"
25341
25342 #include <stdlib.h>
25343 #include <stdio.h>
25344 #include <wchar.h>
25345 #ifdef HAVE_LIBUTF8_H
25346 #include <libutf8.h>
25347 #endif
25348 int
25349 main (void)
25350 {
25351 mbstate_t value; (void)value
25352   ;
25353   return 0;
25354 }
25355 _ACEOF
25356 rm -f "conftest.$ac_objext"
25357 if { (eval echo "$as_me:25357: \"$ac_compile\"") >&5
25358   (eval $ac_compile) 2>&5
25359   ac_status=$?
25360   echo "$as_me:25360: \$? = $ac_status" >&5
25361   (exit "$ac_status"); } &&
25362          { ac_try='test -s "conftest.$ac_objext"'
25363   { (eval echo "$as_me:25363: \"$ac_try\"") >&5
25364   (eval $ac_try) 2>&5
25365   ac_status=$?
25366   echo "$as_me:25366: \$? = $ac_status" >&5
25367   (exit "$ac_status"); }; }; then
25368   cf_cv_mbstate_t=yes
25369 else
25370   echo "$as_me: failed program was:" >&5
25371 cat "conftest.$ac_ext" >&5
25372 cf_cv_mbstate_t=unknown
25373 fi
25374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25375 fi
25376 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25377 fi
25378 echo "$as_me:25378: result: $cf_cv_mbstate_t" >&5
25379 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
25380
25381 if test "$cf_cv_mbstate_t" = yes ; then
25382
25383 cat >>confdefs.h <<\EOF
25384 #define NEED_WCHAR_H 1
25385 EOF
25386
25387 fi
25388
25389 if test "$cf_cv_mbstate_t" != unknown ; then
25390
25391 cat >>confdefs.h <<\EOF
25392 #define HAVE_MBSTATE_T 1
25393 EOF
25394
25395 fi
25396
25397 for ac_header in \
25398 termio.h \
25399 termios.h \
25400 unistd.h \
25401 sys/ioctl.h \
25402 sys/termio.h \
25403
25404 do
25405 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25406 echo "$as_me:25406: checking for $ac_header" >&5
25407 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25408 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25409   echo $ECHO_N "(cached) $ECHO_C" >&6
25410 else
25411   cat >"conftest.$ac_ext" <<_ACEOF
25412 #line 25412 "configure"
25413 #include "confdefs.h"
25414 #include <$ac_header>
25415 _ACEOF
25416 if { (eval echo "$as_me:25416: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25417   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25418   ac_status=$?
25419   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25420   rm -f conftest.er1
25421   cat conftest.err >&5
25422   echo "$as_me:25422: \$? = $ac_status" >&5
25423   (exit "$ac_status"); } >/dev/null; then
25424   if test -s conftest.err; then
25425     ac_cpp_err=$ac_c_preproc_warn_flag
25426   else
25427     ac_cpp_err=
25428   fi
25429 else
25430   ac_cpp_err=yes
25431 fi
25432 if test -z "$ac_cpp_err"; then
25433   eval "$as_ac_Header=yes"
25434 else
25435   echo "$as_me: failed program was:" >&5
25436   cat "conftest.$ac_ext" >&5
25437   eval "$as_ac_Header=no"
25438 fi
25439 rm -f conftest.err "conftest.$ac_ext"
25440 fi
25441 echo "$as_me:25441: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25442 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25443 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25444   cat >>confdefs.h <<EOF
25445 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25446 EOF
25447
25448 fi
25449 done
25450
25451 if test "$ac_cv_header_termios_h" = yes ; then
25452         case "$CFLAGS $CPPFLAGS" in
25453         (*-D_POSIX_SOURCE*)
25454                 termios_bad=dunno ;;
25455         (*)     termios_bad=maybe ;;
25456         esac
25457         if test "$termios_bad" = maybe ; then
25458         echo "$as_me:25458: checking whether termios.h needs _POSIX_SOURCE" >&5
25459 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
25460         cat >"conftest.$ac_ext" <<_ACEOF
25461 #line 25461 "configure"
25462 #include "confdefs.h"
25463 #include <termios.h>
25464 int
25465 main (void)
25466 {
25467 struct termios foo; int x = foo.c_iflag = 1; (void)x
25468   ;
25469   return 0;
25470 }
25471 _ACEOF
25472 rm -f "conftest.$ac_objext"
25473 if { (eval echo "$as_me:25473: \"$ac_compile\"") >&5
25474   (eval $ac_compile) 2>&5
25475   ac_status=$?
25476   echo "$as_me:25476: \$? = $ac_status" >&5
25477   (exit "$ac_status"); } &&
25478          { ac_try='test -s "conftest.$ac_objext"'
25479   { (eval echo "$as_me:25479: \"$ac_try\"") >&5
25480   (eval $ac_try) 2>&5
25481   ac_status=$?
25482   echo "$as_me:25482: \$? = $ac_status" >&5
25483   (exit "$ac_status"); }; }; then
25484   termios_bad=no
25485 else
25486   echo "$as_me: failed program was:" >&5
25487 cat "conftest.$ac_ext" >&5
25488
25489                 cat >"conftest.$ac_ext" <<_ACEOF
25490 #line 25490 "configure"
25491 #include "confdefs.h"
25492
25493 #define _POSIX_SOURCE
25494 #include <termios.h>
25495 int
25496 main (void)
25497 {
25498 struct termios foo; int x = foo.c_iflag = 2; (void)x
25499   ;
25500   return 0;
25501 }
25502 _ACEOF
25503 rm -f "conftest.$ac_objext"
25504 if { (eval echo "$as_me:25504: \"$ac_compile\"") >&5
25505   (eval $ac_compile) 2>&5
25506   ac_status=$?
25507   echo "$as_me:25507: \$? = $ac_status" >&5
25508   (exit "$ac_status"); } &&
25509          { ac_try='test -s "conftest.$ac_objext"'
25510   { (eval echo "$as_me:25510: \"$ac_try\"") >&5
25511   (eval $ac_try) 2>&5
25512   ac_status=$?
25513   echo "$as_me:25513: \$? = $ac_status" >&5
25514   (exit "$ac_status"); }; }; then
25515   termios_bad=unknown
25516 else
25517   echo "$as_me: failed program was:" >&5
25518 cat "conftest.$ac_ext" >&5
25519 termios_bad=yes
25520 cat >>confdefs.h <<\EOF
25521 #define _POSIX_SOURCE 1
25522 EOF
25523
25524 fi
25525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25526
25527 fi
25528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25529         echo "$as_me:25529: result: $termios_bad" >&5
25530 echo "${ECHO_T}$termios_bad" >&6
25531         fi
25532 fi
25533
25534 echo "$as_me:25534: checking declaration of size-change" >&5
25535 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
25536 if test "${cf_cv_sizechange+set}" = set; then
25537   echo $ECHO_N "(cached) $ECHO_C" >&6
25538 else
25539
25540         cf_cv_sizechange=unknown
25541         cf_save_CPPFLAGS="$CPPFLAGS"
25542
25543 for cf_opts in "" "NEED_PTEM_H"
25544 do
25545
25546         CPPFLAGS="$cf_save_CPPFLAGS"
25547         if test -n "$cf_opts"
25548         then
25549
25550         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25551         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
25552
25553         fi
25554         cat >"conftest.$ac_ext" <<_ACEOF
25555 #line 25555 "configure"
25556 #include "confdefs.h"
25557 #include <sys/types.h>
25558 #ifdef HAVE_TERMIOS_H
25559 #include <termios.h>
25560 #else
25561 #ifdef HAVE_TERMIO_H
25562 #include <termio.h>
25563 #endif
25564 #endif
25565
25566 #ifdef NEED_PTEM_H
25567 /* This is a workaround for SCO:  they neglected to define struct winsize in
25568  * termios.h -- it's only in termio.h and ptem.h
25569  */
25570 #include <sys/stream.h>
25571 #include <sys/ptem.h>
25572 #endif
25573
25574 #ifdef HAVE_SYS_IOCTL_H
25575 #include <sys/ioctl.h>
25576 #endif
25577
25578 int
25579 main (void)
25580 {
25581
25582 #ifdef TIOCGSIZE
25583         struct ttysize win;     /* SunOS 3.0... */
25584         int y = win.ts_lines = 2;
25585         int x = win.ts_cols = 1;
25586         (void)y;
25587         (void)x;
25588 #else
25589 #ifdef TIOCGWINSZ
25590         struct winsize win;     /* everything else */
25591         int y = win.ws_row = 2;
25592         int x = win.ws_col = 1;
25593         (void)y;
25594         (void)x;
25595 #else
25596         no TIOCGSIZE or TIOCGWINSZ
25597 #endif /* TIOCGWINSZ */
25598 #endif /* TIOCGSIZE */
25599
25600   ;
25601   return 0;
25602 }
25603 _ACEOF
25604 rm -f "conftest.$ac_objext"
25605 if { (eval echo "$as_me:25605: \"$ac_compile\"") >&5
25606   (eval $ac_compile) 2>&5
25607   ac_status=$?
25608   echo "$as_me:25608: \$? = $ac_status" >&5
25609   (exit "$ac_status"); } &&
25610          { ac_try='test -s "conftest.$ac_objext"'
25611   { (eval echo "$as_me:25611: \"$ac_try\"") >&5
25612   (eval $ac_try) 2>&5
25613   ac_status=$?
25614   echo "$as_me:25614: \$? = $ac_status" >&5
25615   (exit "$ac_status"); }; }; then
25616   cf_cv_sizechange=yes
25617 else
25618   echo "$as_me: failed program was:" >&5
25619 cat "conftest.$ac_ext" >&5
25620 cf_cv_sizechange=no
25621 fi
25622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25623
25624         CPPFLAGS="$cf_save_CPPFLAGS"
25625         if test "$cf_cv_sizechange" = yes ; then
25626                 echo "size-change succeeded ($cf_opts)" >&5
25627                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
25628                 break
25629         fi
25630 done
25631
25632 fi
25633 echo "$as_me:25633: result: $cf_cv_sizechange" >&5
25634 echo "${ECHO_T}$cf_cv_sizechange" >&6
25635 if test "$cf_cv_sizechange" != no ; then
25636
25637 cat >>confdefs.h <<\EOF
25638 #define HAVE_SIZECHANGE 1
25639 EOF
25640
25641         case "$cf_cv_sizechange" in
25642         (NEED*)
25643                 cat >>confdefs.h <<EOF
25644 #define $cf_cv_sizechange  1
25645 EOF
25646
25647                 ;;
25648         esac
25649 fi
25650
25651 PACKAGE_PREFIX=DLG
25652 PACKAGE_CONFIG=dlg_config.h
25653
25654 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
25655
25656 cat >"conftest.$ac_ext" <<_ACEOF
25657 #line 25657 "configure"
25658 #include "confdefs.h"
25659 #include <locale.h>
25660 int
25661 main (void)
25662 {
25663 setlocale(LC_ALL, "")
25664   ;
25665   return 0;
25666 }
25667 _ACEOF
25668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25669 if { (eval echo "$as_me:25669: \"$ac_link\"") >&5
25670   (eval $ac_link) 2>&5
25671   ac_status=$?
25672   echo "$as_me:25672: \$? = $ac_status" >&5
25673   (exit "$ac_status"); } &&
25674          { ac_try='test -s "conftest$ac_exeext"'
25675   { (eval echo "$as_me:25675: \"$ac_try\"") >&5
25676   (eval $ac_try) 2>&5
25677   ac_status=$?
25678   echo "$as_me:25678: \$? = $ac_status" >&5
25679   (exit "$ac_status"); }; }; then
25680
25681 cat >>confdefs.h <<\EOF
25682 #define HAVE_SETLOCALE 1
25683 EOF
25684
25685 else
25686   echo "$as_me: failed program was:" >&5
25687 cat "conftest.$ac_ext" >&5
25688 fi
25689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25690
25691 echo "$as_me:25691: checking if runtime has nl_langinfo support for first weekday" >&5
25692 echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
25693 if test "${cf_nl_langinfo_1stday+set}" = set; then
25694   echo $ECHO_N "(cached) $ECHO_C" >&6
25695 else
25696
25697         cat >"conftest.$ac_ext" <<_ACEOF
25698 #line 25698 "configure"
25699 #include "confdefs.h"
25700
25701 #include <langinfo.h>
25702 #include <locale.h>
25703
25704 int
25705 main (void)
25706 {
25707
25708         int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
25709         long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
25710         (void) first_weekday;
25711         (void) week_1stday_l;
25712
25713   ;
25714   return 0;
25715 }
25716 _ACEOF
25717 rm -f "conftest.$ac_objext"
25718 if { (eval echo "$as_me:25718: \"$ac_compile\"") >&5
25719   (eval $ac_compile) 2>&5
25720   ac_status=$?
25721   echo "$as_me:25721: \$? = $ac_status" >&5
25722   (exit "$ac_status"); } &&
25723          { ac_try='test -s "conftest.$ac_objext"'
25724   { (eval echo "$as_me:25724: \"$ac_try\"") >&5
25725   (eval $ac_try) 2>&5
25726   ac_status=$?
25727   echo "$as_me:25727: \$? = $ac_status" >&5
25728   (exit "$ac_status"); }; }; then
25729   cf_nl_langinfo_1stday=yes
25730
25731 else
25732   echo "$as_me: failed program was:" >&5
25733 cat "conftest.$ac_ext" >&5
25734 cf_nl_langinfo_1stday=no
25735
25736 fi
25737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25738
25739 fi
25740 echo "$as_me:25740: result: $cf_nl_langinfo_1stday" >&5
25741 echo "${ECHO_T}$cf_nl_langinfo_1stday" >&6
25742 test "x$cf_nl_langinfo_1stday" = xyes &&
25743 cat >>confdefs.h <<\EOF
25744 #define HAVE_NL_LANGINFO_1STDAY 1
25745 EOF
25746
25747 if test "$GCC" = yes || test "$GXX" = yes
25748 then
25749
25750         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25751         CFLAGS="${CFLAGS}$EXTRA_CFLAGS"
25752
25753         EXTRA_CFLAGS=
25754 fi
25755
25756 echo "$as_me:25756: checking if rpath-hack should be disabled" >&5
25757 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
25758
25759 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
25760 if test "${enable_rpath_hack+set}" = set; then
25761   enableval="$enable_rpath_hack"
25762   test "$enableval" != no && enableval=yes
25763         if test "$enableval" != "yes" ; then
25764     enable_rpath_hack=no
25765         else
25766                 enable_rpath_hack=yes
25767         fi
25768 else
25769   enableval=yes
25770         enable_rpath_hack=yes
25771
25772 fi;
25773 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
25774 echo "$as_me:25774: result: $cf_disable_rpath_hack" >&5
25775 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
25776
25777 if test "$enable_rpath_hack" = yes ; then
25778
25779 echo "$as_me:25779: checking for updated LDFLAGS" >&5
25780 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
25781 if test -n "$LD_RPATH_OPT" ; then
25782         echo "$as_me:25782: result: maybe" >&5
25783 echo "${ECHO_T}maybe" >&6
25784
25785         for ac_prog in ldd
25786 do
25787   # Extract the first word of "$ac_prog", so it can be a program name with args.
25788 set dummy $ac_prog; ac_word=$2
25789 echo "$as_me:25789: checking for $ac_word" >&5
25790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25791 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
25792   echo $ECHO_N "(cached) $ECHO_C" >&6
25793 else
25794   if test -n "$cf_ldd_prog"; then
25795   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
25796 else
25797   ac_save_IFS=$IFS; IFS=$ac_path_separator
25798 ac_dummy="$PATH"
25799 for ac_dir in $ac_dummy; do
25800   IFS=$ac_save_IFS
25801   test -z "$ac_dir" && ac_dir=.
25802   $as_executable_p "$ac_dir/$ac_word" || continue
25803 ac_cv_prog_cf_ldd_prog="$ac_prog"
25804 echo "$as_me:25804: found $ac_dir/$ac_word" >&5
25805 break
25806 done
25807
25808 fi
25809 fi
25810 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
25811 if test -n "$cf_ldd_prog"; then
25812   echo "$as_me:25812: result: $cf_ldd_prog" >&5
25813 echo "${ECHO_T}$cf_ldd_prog" >&6
25814 else
25815   echo "$as_me:25815: result: no" >&5
25816 echo "${ECHO_T}no" >&6
25817 fi
25818
25819   test -n "$cf_ldd_prog" && break
25820 done
25821 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
25822
25823         cf_rpath_list="/usr/lib /lib"
25824         if test "$cf_ldd_prog" != no
25825         then
25826                 cf_rpath_oops=
25827
25828 cat >"conftest.$ac_ext" <<_ACEOF
25829 #line 25829 "configure"
25830 #include "confdefs.h"
25831 #include <stdio.h>
25832 int
25833 main (void)
25834 {
25835 printf("Hello");
25836   ;
25837   return 0;
25838 }
25839 _ACEOF
25840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25841 if { (eval echo "$as_me:25841: \"$ac_link\"") >&5
25842   (eval $ac_link) 2>&5
25843   ac_status=$?
25844   echo "$as_me:25844: \$? = $ac_status" >&5
25845   (exit "$ac_status"); } &&
25846          { ac_try='test -s "conftest$ac_exeext"'
25847   { (eval echo "$as_me:25847: \"$ac_try\"") >&5
25848   (eval $ac_try) 2>&5
25849   ac_status=$?
25850   echo "$as_me:25850: \$? = $ac_status" >&5
25851   (exit "$ac_status"); }; }; then
25852   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
25853                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
25854 else
25855   echo "$as_me: failed program was:" >&5
25856 cat "conftest.$ac_ext" >&5
25857 fi
25858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25859
25860                 # If we passed the link-test, but get a "not found" on a given library,
25861                 # this could be due to inept reconfiguration of gcc to make it only
25862                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
25863                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
25864                 # /usr/local libraries.
25865                 if test -n "$cf_rpath_oops"
25866                 then
25867                         for cf_rpath_src in $cf_rpath_oops
25868                         do
25869                                 for cf_rpath_dir in \
25870                                         /usr/local \
25871                                         /usr/pkg \
25872                                         /opt/sfw
25873                                 do
25874                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
25875                                         then
25876                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
25877
25878 echo "${as_me:-configure}:25878: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
25879
25880                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
25881                                                 break
25882                                         fi
25883                                 done
25884                         done
25885                 fi
25886         fi
25887
25888         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25889
25890 echo "${as_me:-configure}:25890: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25891
25892 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
25893
25894 echo "${as_me:-configure}:25894: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
25895
25896 cf_rpath_dst=
25897 for cf_rpath_src in $LDFLAGS
25898 do
25899         case "$cf_rpath_src" in
25900         (-L*)
25901
25902                 # check if this refers to a directory which we will ignore
25903                 cf_rpath_skip=no
25904                 if test -n "$cf_rpath_list"
25905                 then
25906                         for cf_rpath_item in $cf_rpath_list
25907                         do
25908                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25909                                 then
25910                                         cf_rpath_skip=yes
25911                                         break
25912                                 fi
25913                         done
25914                 fi
25915
25916                 if test "$cf_rpath_skip" = no
25917                 then
25918                         # transform the option
25919                         if test "$LD_RPATH_OPT" = "-R " ; then
25920                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25921                         else
25922                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25923                         fi
25924
25925                         # if we have not already added this, add it now
25926                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25927                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25928                         then
25929                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25930
25931 echo "${as_me:-configure}:25931: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25932
25933                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25934                         fi
25935                 fi
25936                 ;;
25937         esac
25938         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25939 done
25940 LDFLAGS=$cf_rpath_dst
25941
25942 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
25943
25944 echo "${as_me:-configure}:25944: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
25945
25946 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
25947
25948 echo "${as_me:-configure}:25948: testing ...checking LIBS $LIBS ..." 1>&5
25949
25950 cf_rpath_dst=
25951 for cf_rpath_src in $LIBS
25952 do
25953         case "$cf_rpath_src" in
25954         (-L*)
25955
25956                 # check if this refers to a directory which we will ignore
25957                 cf_rpath_skip=no
25958                 if test -n "$cf_rpath_list"
25959                 then
25960                         for cf_rpath_item in $cf_rpath_list
25961                         do
25962                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25963                                 then
25964                                         cf_rpath_skip=yes
25965                                         break
25966                                 fi
25967                         done
25968                 fi
25969
25970                 if test "$cf_rpath_skip" = no
25971                 then
25972                         # transform the option
25973                         if test "$LD_RPATH_OPT" = "-R " ; then
25974                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25975                         else
25976                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25977                         fi
25978
25979                         # if we have not already added this, add it now
25980                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25981                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25982                         then
25983                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25984
25985 echo "${as_me:-configure}:25985: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25986
25987                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25988                         fi
25989                 fi
25990                 ;;
25991         esac
25992         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25993 done
25994 LIBS=$cf_rpath_dst
25995
25996 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
25997
25998 echo "${as_me:-configure}:25998: testing ...checked LIBS $LIBS ..." 1>&5
25999
26000         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
26001
26002 echo "${as_me:-configure}:26002: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
26003
26004 else
26005         echo "$as_me:26005: result: no" >&5
26006 echo "${ECHO_T}no" >&6
26007 fi
26008
26009 fi
26010
26011 cf_libname=\${LIB_BASENAME}
26012 cf_liblink=$cf_libname
26013 cf_libroot=$cf_libname
26014
26015 if test "x$cf_cv_do_symlinks" = xyes
26016 then
26017         case "x$cf_cv_shlib_version" in
26018         (xrel)
26019                 cf_liblink="\${LIB_ABI_NAME}"
26020                 cf_libname="\${LIB_REL_NAME}"
26021                 ;;
26022         (xabi)
26023                 cf_liblink="\${LIB_REL_NAME}"
26024                 cf_libname="\${LIB_ABI_NAME}"
26025                 ;;
26026         esac
26027 fi
26028 LIB_TARGET=$cf_libname
26029
26030 SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
26031 LIB_BASENAME    = \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
26032 LIB_REL_NAME    = \${LIB_BASENAME}.\${REL_VERSION}\\
26033 LIB_ABI_NAME    = \${LIB_BASENAME}.\${ABI_VERSION}\\
26034 LIB_TARGET      = $LIB_TARGET\\
26035 RM_SHARED_OPTS  = $RM_SHARED_OPTS\\
26036 # end CF__DEFINE_SHLIB_VARS"
26037
26038 echo "$as_me:26038: checking for linker search path" >&5
26039 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26040 if test "${cf_cv_ld_searchpath+set}" = set; then
26041   echo $ECHO_N "(cached) $ECHO_C" >&6
26042 else
26043
26044 if test "$cross_compiling" != yes ; then
26045
26046 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26047 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26048
26049 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26050 # update the cache, which makes it run faster.
26051 test -z "$cf_pathlist" && \
26052         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26053
26054 test -z "$cf_pathlist" &&
26055         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26056
26057 # This works with OpenBSD 6.5, which lists only filenames
26058 test -z "$cf_pathlist" &&
26059         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26060
26061 if test -z "$cf_pathlist"
26062 then
26063         # dyld default path with MacOS
26064         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26065         then
26066                 # do this to bypass check
26067                 cf_cv_ld_searchpath='$HOME/lib'
26068                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26069         fi
26070 fi
26071
26072 if test -z "$cf_pathlist"
26073 then
26074         # Solaris is hardcoded
26075         if test -d /opt/SUNWspro/lib
26076         then
26077                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26078         elif test -d /usr/ccs/lib
26079         then
26080                 cf_pathlist="/usr/ccs/lib /usr/lib"
26081         fi
26082 fi
26083
26084 fi
26085
26086 # If nothing else, assume it is conventional
26087 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26088
26089 # Finally, check that this is only directories
26090 for cf_path in $0 $cf_pathlist
26091 do
26092         if test -d "$cf_path"; then
26093                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26094                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26095         fi
26096 done
26097
26098 # Ensure that it is nonempty
26099 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26100
26101 fi
26102 echo "$as_me:26102: result: $cf_cv_ld_searchpath" >&5
26103 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26104
26105 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26106
26107 ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
26108 ac_config_commands="$ac_config_commands default"
26109 cat >confcache <<\_ACEOF
26110 # This file is a shell script that caches the results of configure
26111 # tests run on this system so they can be shared between configure
26112 # scripts and configure runs, see configure's option --config-cache.
26113 # It is not useful on other systems.  If it contains results you don't
26114 # want to keep, you may remove or edit it.
26115 #
26116 # config.status only pays attention to the cache file if you give it
26117 # the --recheck option to rerun configure.
26118 #
26119 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26120 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26121 # following values.
26122
26123 _ACEOF
26124
26125 # The following way of writing the cache mishandles newlines in values,
26126 # but we know of no workaround that is simple, portable, and efficient.
26127 # So, don't put newlines in cache variables' values.
26128 # Ultrix sh set writes to stderr and can't be redirected directly,
26129 # and sets the high bit in the cache file unless we assign to the vars.
26130 {
26131   (set) 2>&1 |
26132     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26133     *ac_space=\ *)
26134       # `set' does not quote correctly, so add quotes (double-quote
26135       # substitution turns \\\\ into \\, and sed turns \\ into \).
26136       sed -n \
26137         "s/'/'\\\\''/g;
26138           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26139       ;;
26140     *)
26141       # `set' quotes correctly as required by POSIX, so do not add quotes.
26142       sed -n \
26143         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26144       ;;
26145     esac;
26146 } |
26147   sed '
26148      t clear
26149      : clear
26150      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26151      t end
26152      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26153      : end' >>confcache
26154 if cmp -s $cache_file confcache; then :; else
26155   if test -w $cache_file; then
26156     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26157     cat confcache >$cache_file
26158   else
26159     echo "not updating unwritable cache $cache_file"
26160   fi
26161 fi
26162 rm -f confcache
26163
26164 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26165 # Let make expand exec_prefix.
26166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26167
26168 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26169 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26170 # trailing colons and then remove the whole line if VPATH becomes empty
26171 # (actually we leave an empty line to preserve line numbers).
26172 if test "x$srcdir" = x.; then
26173   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26174 s/:*\$(srcdir):*/:/;
26175 s/:*\${srcdir}:*/:/;
26176 s/:*@srcdir@:*/:/;
26177 s/^\([^=]*=[    ]*\):*/\1/;
26178 s/:*$//;
26179 s/^[^=]*=[      ]*$//;
26180 }'
26181 fi
26182
26183 DEFS=-DHAVE_CONFIG_H
26184
26185 : "${CONFIG_STATUS=./config.status}"
26186 ac_clean_files_save=$ac_clean_files
26187 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26188 { echo "$as_me:26188: creating $CONFIG_STATUS" >&5
26189 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26190 cat >"$CONFIG_STATUS" <<_ACEOF
26191 #! $SHELL
26192 # Generated automatically by configure.
26193 # Run this file to recreate the current configuration.
26194 # Compiler output produced by configure, useful for debugging
26195 # configure, is in config.log if it exists.
26196
26197 debug=false
26198 SHELL=\${CONFIG_SHELL-$SHELL}
26199 ac_cs_invocation="\$0 \$@"
26200
26201 CLICOLOR_FORCE= GREP_OPTIONS=
26202 unset CLICOLOR_FORCE GREP_OPTIONS
26203 _ACEOF
26204
26205 cat >>"$CONFIG_STATUS" <<\_ACEOF
26206 # Be Bourne compatible
26207 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26208   emulate sh
26209   NULLCMD=:
26210 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26211   set -o posix
26212 fi
26213
26214 # Name of the executable.
26215 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26216
26217 if expr a : '\(a\)' >/dev/null 2>&1; then
26218   as_expr=expr
26219 else
26220   as_expr=false
26221 fi
26222
26223 rm -f conf$$ conf$$.exe conf$$.file
26224 echo >conf$$.file
26225 if ln -s conf$$.file conf$$ 2>/dev/null; then
26226   # We could just check for DJGPP; but this test a) works b) is more generic
26227   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26228   if test -f conf$$.exe; then
26229     # Don't use ln at all; we don't have any links
26230     as_ln_s='cp -p'
26231   else
26232     as_ln_s='ln -s'
26233   fi
26234 elif ln conf$$.file conf$$ 2>/dev/null; then
26235   as_ln_s=ln
26236 else
26237   as_ln_s='cp -p'
26238 fi
26239 rm -f conf$$ conf$$.exe conf$$.file
26240
26241 as_executable_p="test -f"
26242
26243 # Support unset when possible.
26244 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26245   as_unset="unset"
26246 else
26247   as_unset="false"
26248 fi
26249
26250 # NLS nuisances.
26251 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26252 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26253 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26254 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26255 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26256 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26257 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26258 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26259
26260 # IFS
26261 # We need space, tab and new line, in precisely that order.
26262 as_nl='
26263 '
26264 IFS="   $as_nl"
26265
26266 # CDPATH.
26267 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26268
26269 exec 6>&1
26270
26271 _ACEOF
26272
26273 # Files that config.status was made for.
26274 if test -n "$ac_config_files"; then
26275   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
26276 fi
26277
26278 if test -n "$ac_config_headers"; then
26279   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
26280 fi
26281
26282 if test -n "$ac_config_links"; then
26283   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
26284 fi
26285
26286 if test -n "$ac_config_commands"; then
26287   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
26288 fi
26289
26290 cat >>"$CONFIG_STATUS" <<\EOF
26291
26292 ac_cs_usage="\
26293 \`$as_me' instantiates files from templates according to the
26294 current configuration.
26295
26296 Usage: $0 [OPTIONS] [FILE]...
26297
26298   -h, --help       print this help, then exit
26299   -V, --version    print version number, then exit
26300   -d, --debug      don't remove temporary files
26301       --recheck    update $as_me by reconfiguring in the same conditions
26302   --file=FILE[:TEMPLATE]
26303                    instantiate the configuration file FILE
26304   --header=FILE[:TEMPLATE]
26305                    instantiate the configuration header FILE
26306
26307 Configuration files:
26308 $config_files
26309
26310 Configuration headers:
26311 $config_headers
26312
26313 Configuration commands:
26314 $config_commands
26315
26316 Report bugs to <dickey@invisible-island.net>."
26317 EOF
26318
26319 cat >>"$CONFIG_STATUS" <<EOF
26320 ac_cs_version="\\
26321 config.status
26322 configured by $0, generated by GNU Autoconf 2.52.20210105,
26323   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26324
26325 Copyright 2003-2020,2021        Thomas E. Dickey
26326 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26327 Free Software Foundation, Inc.
26328 This config.status script is free software; the Free Software Foundation
26329 gives unlimited permission to copy, distribute and modify it."
26330 srcdir="$srcdir"
26331 INSTALL="$INSTALL"
26332 EOF
26333
26334 cat >>"$CONFIG_STATUS" <<\EOF
26335 # If no file are specified by the user, then we need to provide default
26336 # value.  By we need to know if files were specified by the user.
26337 ac_need_defaults=:
26338 while test $# != 0
26339 do
26340   case $1 in
26341   --*=*)
26342     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26343     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26344     shift
26345     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26346     shift
26347     ;;
26348   -*);;
26349   *) # This is not an option, so the user has probably given explicit
26350      # arguments.
26351      ac_need_defaults=false;;
26352   esac
26353
26354   case $1 in
26355   # Handling of the options.
26356 EOF
26357 cat >>"$CONFIG_STATUS" <<EOF
26358   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26359     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26360     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26361 EOF
26362 cat >>"$CONFIG_STATUS" <<\EOF
26363   --version | --vers* | -V )
26364     echo "$ac_cs_version"; exit 0 ;;
26365   --he | --h)
26366     # Conflict between --help and --header
26367     { { echo "$as_me:26367: error: ambiguous option: $1
26368 Try \`$0 --help' for more information." >&5
26369 echo "$as_me: error: ambiguous option: $1
26370 Try \`$0 --help' for more information." >&2;}
26371    { (exit 1); exit 1; }; };;
26372   --help | --hel | -h )
26373     echo "$ac_cs_usage"; exit 0 ;;
26374   --debug | --d* | -d )
26375     debug=: ;;
26376   --file | --fil | --fi | --f )
26377     shift
26378     CONFIG_FILES="$CONFIG_FILES $1"
26379     ac_need_defaults=false;;
26380   --header | --heade | --head | --hea )
26381     shift
26382     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26383     ac_need_defaults=false;;
26384
26385   # This is an error.
26386   -*) { { echo "$as_me:26386: error: unrecognized option: $1
26387 Try \`$0 --help' for more information." >&5
26388 echo "$as_me: error: unrecognized option: $1
26389 Try \`$0 --help' for more information." >&2;}
26390    { (exit 1); exit 1; }; } ;;
26391
26392   *) ac_config_targets="$ac_config_targets $1" ;;
26393
26394   esac
26395   shift
26396 done
26397
26398 exec 5>>config.log
26399 cat >&5 << _ACEOF
26400
26401 ## ----------------------- ##
26402 ## Running config.status.  ##
26403 ## ----------------------- ##
26404
26405 This file was extended by $as_me 2.52.20210105, executed with
26406   CONFIG_FILES    = $CONFIG_FILES
26407   CONFIG_HEADERS  = $CONFIG_HEADERS
26408   CONFIG_LINKS    = $CONFIG_LINKS
26409   CONFIG_COMMANDS = $CONFIG_COMMANDS
26410   > "$ac_cs_invocation"
26411 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26412
26413 _ACEOF
26414 EOF
26415
26416 cat >>"$CONFIG_STATUS" <<EOF
26417 #
26418 # INIT-COMMANDS section.
26419 #
26420
26421 ABI_VERSION="$ABI_VERSION"
26422 REL_VERSION="$REL_VERSION"
26423 LIB_MODEL="$LIB_MODEL"
26424 LIB_PREFIX="$LIB_PREFIX"
26425 LIB_ROOTNAME="$LIB_ROOTNAME"
26426 DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
26427 RM_SHARED_OPTS="$RM_SHARED_OPTS"
26428 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26429 cf_cv_shlib_version="$cf_cv_shlib_version"
26430
26431 EOF
26432
26433 cat >>"$CONFIG_STATUS" <<\EOF
26434 for ac_config_target in $ac_config_targets
26435 do
26436   case "$ac_config_target" in
26437   # Handling of arguments.
26438   "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
26439   "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
26440   "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
26441   "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
26442   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
26443   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26444   "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
26445   *) { { echo "$as_me:26445: error: invalid argument: $ac_config_target" >&5
26446 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26447    { (exit 1); exit 1; }; };;
26448   esac
26449 done
26450
26451 # If the user did not use the arguments to specify the items to instantiate,
26452 # then the envvar interface is used.  Set only those that are not.
26453 # We use the long form for the default assignment because of an extremely
26454 # bizarre bug on SunOS 4.1.3.
26455 if "$ac_need_defaults"; then
26456   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26457   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26458   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26459 fi
26460
26461 # Create a temporary directory, and hook for its removal unless debugging.
26462 $debug ||
26463 {
26464   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26465   trap '{ (exit 1); exit 1; }' 1 2 13 15
26466 }
26467
26468 # Create a (secure) tmp directory for tmp files.
26469 : ${TMPDIR=/tmp}
26470 {
26471   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26472   test -n "$tmp" && test -d "$tmp"
26473 }  ||
26474 {
26475   tmp=$TMPDIR/cs$$-$RANDOM
26476   (umask 077 && mkdir $tmp)
26477 } ||
26478 {
26479    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26480    { (exit 1); exit 1; }
26481 }
26482
26483 EOF
26484
26485 cat >>"$CONFIG_STATUS" <<EOF
26486
26487 #
26488 # CONFIG_FILES section.
26489 #
26490
26491 # No need to generate the scripts if there are no CONFIG_FILES.
26492 # This happens for instance when ./config.status config.h
26493 if test -n "\$CONFIG_FILES"; then
26494   # Protect against being on the right side of a sed subst in config.status.
26495   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26496    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26497 s,@SHELL@,$SHELL,;t t
26498 s,@exec_prefix@,$exec_prefix,;t t
26499 s,@prefix@,$prefix,;t t
26500 s,@program_transform_name@,$program_transform_name,;t t
26501 s,@bindir@,$bindir,;t t
26502 s,@sbindir@,$sbindir,;t t
26503 s,@libexecdir@,$libexecdir,;t t
26504 s,@datarootdir@,$datarootdir,;t t
26505 s,@datadir@,$datadir,;t t
26506 s,@sysconfdir@,$sysconfdir,;t t
26507 s,@sharedstatedir@,$sharedstatedir,;t t
26508 s,@localstatedir@,$localstatedir,;t t
26509 s,@runstatedir@,$runstatedir,;t t
26510 s,@libdir@,$libdir,;t t
26511 s,@includedir@,$includedir,;t t
26512 s,@oldincludedir@,$oldincludedir,;t t
26513 s,@infodir@,$infodir,;t t
26514 s,@mandir@,$mandir,;t t
26515 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26516 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26517 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26518 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26519 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26520 s,@build_alias@,$build_alias,;t t
26521 s,@host_alias@,$host_alias,;t t
26522 s,@target_alias@,$target_alias,;t t
26523 s,@ECHO_C@,$ECHO_C,;t t
26524 s,@ECHO_N@,$ECHO_N,;t t
26525 s,@ECHO_T@,$ECHO_T,;t t
26526 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26527 s,@DEFS@,$DEFS,;t t
26528 s,@LIBS@,$LIBS,;t t
26529 s,@DESTDIR@,$DESTDIR,;t t
26530 s,@CC@,$CC,;t t
26531 s,@CFLAGS@,$CFLAGS,;t t
26532 s,@LDFLAGS@,$LDFLAGS,;t t
26533 s,@CPPFLAGS@,$CPPFLAGS,;t t
26534 s,@ac_ct_CC@,$ac_ct_CC,;t t
26535 s,@EXEEXT@,$EXEEXT,;t t
26536 s,@OBJEXT@,$OBJEXT,;t t
26537 s,@build@,$build,;t t
26538 s,@build_cpu@,$build_cpu,;t t
26539 s,@build_vendor@,$build_vendor,;t t
26540 s,@build_os@,$build_os,;t t
26541 s,@host@,$host,;t t
26542 s,@host_cpu@,$host_cpu,;t t
26543 s,@host_vendor@,$host_vendor,;t t
26544 s,@host_os@,$host_os,;t t
26545 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26546 s,@CPP@,$CPP,;t t
26547 s,@GREP@,$GREP,;t t
26548 s,@EGREP@,$EGREP,;t t
26549 s,@SET_MAKE@,$SET_MAKE,;t t
26550 s,@RANLIB@,$RANLIB,;t t
26551 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26552 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26553 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26554 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26555 s,@LN_S@,$LN_S,;t t
26556 s,@LINT@,$LINT,;t t
26557 s,@LINT_OPTS@,$LINT_OPTS,;t t
26558 s,@GROFF_PATH@,$GROFF_PATH,;t t
26559 s,@NROFF_PATH@,$NROFF_PATH,;t t
26560 s,@TBL_PATH@,$TBL_PATH,;t t
26561 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
26562 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
26563 s,@AR@,$AR,;t t
26564 s,@ac_ct_AR@,$ac_ct_AR,;t t
26565 s,@ARFLAGS@,$ARFLAGS,;t t
26566 s,@FGREP@,$FGREP,;t t
26567 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26568 s,@CTAGS@,$CTAGS,;t t
26569 s,@ETAGS@,$ETAGS,;t t
26570 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26571 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26572 s,@ECHO_LT@,$ECHO_LT,;t t
26573 s,@ECHO_LD@,$ECHO_LD,;t t
26574 s,@RULE_CC@,$RULE_CC,;t t
26575 s,@SHOW_CC@,$SHOW_CC,;t t
26576 s,@ECHO_CC@,$ECHO_CC,;t t
26577 s,@PROG_EXT@,$PROG_EXT,;t t
26578 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26579 s,@X_CFLAGS@,$X_CFLAGS,;t t
26580 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
26581 s,@X_LIBS@,$X_LIBS,;t t
26582 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
26583 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26584 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26585 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26586 s,@VERSION@,$VERSION,;t t
26587 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26588 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26589 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26590 s,@PACKAGE@,$PACKAGE,;t t
26591 s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
26592 s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
26593 s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
26594 s,@SUB_INC@,$SUB_INC,;t t
26595 s,@cf_man2html@,$cf_man2html,;t t
26596 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
26597 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
26598 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
26599 s,@CONFIG_H@,$CONFIG_H,;t t
26600 s,@ALLOCA@,$ALLOCA,;t t
26601 s,@GLIBC21@,$GLIBC21,;t t
26602 s,@LIBICONV@,$LIBICONV,;t t
26603 s,@USE_NLS@,$USE_NLS,;t t
26604 s,@MSGFMT@,$MSGFMT,;t t
26605 s,@GMSGFMT@,$GMSGFMT,;t t
26606 s,@XGETTEXT@,$XGETTEXT,;t t
26607 s,@INTLBISON@,$INTLBISON,;t t
26608 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
26609 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
26610 s,@CATALOGS@,$CATALOGS,;t t
26611 s,@CATOBJEXT@,$CATOBJEXT,;t t
26612 s,@GMOFILES@,$GMOFILES,;t t
26613 s,@INTLLIBS@,$INTLLIBS,;t t
26614 s,@INTLOBJS@,$INTLOBJS,;t t
26615 s,@POFILES@,$POFILES,;t t
26616 s,@POSUB@,$POSUB,;t t
26617 s,@DATADIRNAME@,$DATADIRNAME,;t t
26618 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
26619 s,@GENCAT@,$GENCAT,;t t
26620 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
26621 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
26622 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
26623 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
26624 s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
26625 s,@GT_YES@,$GT_YES,;t t
26626 s,@GT_NO@,$GT_NO,;t t
26627 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
26628 s,@ABI_VERSION@,$ABI_VERSION,;t t
26629 s,@REL_VERSION@,$REL_VERSION,;t t
26630 s,@shlibdir@,$shlibdir,;t t
26631 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26632 s,@LIBTOOL@,$LIBTOOL,;t t
26633 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26634 s,@LT_UNDEF@,$LT_UNDEF,;t t
26635 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26636 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26637 s,@LIB_CREATE@,$LIB_CREATE,;t t
26638 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26639 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26640 s,@LIB_PREP@,$LIB_PREP,;t t
26641 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26642 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26643 s,@LIB_LINK@,$LIB_LINK,;t t
26644 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26645 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26646 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26647 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26648 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26649 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26650 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26651 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26652 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26653 s,@LINK_PROGS@,$LINK_PROGS,;t t
26654 s,@LINK_TESTS@,$LINK_TESTS,;t t
26655 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26656 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26657 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26658 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26659 s,@RPATH_LIST@,$RPATH_LIST,;t t
26660 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26661 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26662 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26663 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26664 s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
26665 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26666 s,@LIB_MODEL@,$LIB_MODEL,;t t
26667 s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
26668 s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
26669 s,@MAKE_SHARED@,$MAKE_SHARED,;t t
26670 s,@MAKE_STATIC@,$MAKE_STATIC,;t t
26671 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
26672 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
26673 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
26674 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
26675 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
26676 s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
26677 s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
26678 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26679 s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
26680 s,@LIB_TARGET@,$LIB_TARGET,;t t
26681 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26682 CEOF
26683
26684 EOF
26685
26686   cat >>"$CONFIG_STATUS" <<\EOF
26687   # Split the substitutions into bite-sized pieces for seds with
26688   # small command number limits, like on Digital OSF/1 and HP-UX.
26689   ac_max_sed_lines=48
26690   ac_sed_frag=1 # Number of current file.
26691   ac_beg=1 # First line for current file.
26692   ac_end=$ac_max_sed_lines # Line after last line for current file.
26693   ac_more_lines=:
26694   ac_sed_cmds=
26695   while "$ac_more_lines"; do
26696     if test "$ac_beg" -gt 1; then
26697       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26698     else
26699       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26700     fi
26701     if test ! -s $tmp/subs.frag; then
26702       ac_more_lines=false
26703     else
26704       # The purpose of the label and of the branching condition is to
26705       # speed up the sed processing (if there are no `@' at all, there
26706       # is no need to browse any of the substitutions).
26707       # These are the two extra sed commands mentioned above.
26708       (echo ':t
26709   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26710       # It is possible to make a multiline substitution using escaped newlines.
26711       # Ensure that we do not split the substitution between script fragments.
26712       ac_BEG=$ac_end
26713       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
26714       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26715       if test -s $tmp/subs.next; then
26716         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26717         if test ! -s $tmp/subs.edit; then
26718           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26719           if test ! -s $tmp/subs.edit; then
26720             if test "$ac_beg" -gt 1; then
26721               ac_end=`expr "$ac_end" - 1`
26722               continue
26723             fi
26724           fi
26725         fi
26726       fi
26727
26728       if test -z "$ac_sed_cmds"; then
26729         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26730       else
26731         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26732       fi
26733       ac_sed_frag=`expr "$ac_sed_frag" + 1`
26734       ac_beg=$ac_end
26735       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
26736     fi
26737   done
26738   if test -z "$ac_sed_cmds"; then
26739     ac_sed_cmds=cat
26740   fi
26741 fi # test -n "$CONFIG_FILES"
26742
26743 EOF
26744 cat >>"$CONFIG_STATUS" <<\EOF
26745 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26746   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26747   case "$ac_file" in
26748   - | *:- | *:-:* ) # input from stdin
26749         cat >$tmp/stdin
26750         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26751         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26752   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26753         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26754   * )   ac_file_in=$ac_file.in ;;
26755   esac
26756
26757   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26758   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26759          X"$ac_file" : 'X\(//\)[^/]' \| \
26760          X"$ac_file" : 'X\(//\)$' \| \
26761          X"$ac_file" : 'X\(/\)' \| \
26762          .     : '\(.\)' 2>/dev/null ||
26763 echo X"$ac_file" |
26764     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26765           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26766           /^X\(\/\/\)$/{ s//\1/; q; }
26767           /^X\(\/\).*/{ s//\1/; q; }
26768           s/.*/./; q'`
26769   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26770     { case "$ac_dir" in
26771   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26772   *)                      as_incr_dir=.;;
26773 esac
26774 as_dummy="$ac_dir"
26775 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26776   case $as_mkdir_dir in
26777     # Skip DOS drivespec
26778     ?:) as_incr_dir=$as_mkdir_dir ;;
26779     *)
26780       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26781       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26782     ;;
26783   esac
26784 done; }
26785
26786     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26787     # A "../" for each directory in $ac_dir_suffix.
26788     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26789   else
26790     ac_dir_suffix= ac_dots=
26791   fi
26792
26793   case "$srcdir" in
26794   .)  ac_srcdir=.
26795       if test -z "$ac_dots"; then
26796          ac_top_srcdir=.
26797       else
26798          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
26799       fi ;;
26800   [\\/]* | ?:[\\/]* )
26801       ac_srcdir="$srcdir$ac_dir_suffix";
26802       ac_top_srcdir="$srcdir" ;;
26803   *) # Relative path.
26804     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
26805     ac_top_srcdir="$ac_dots$srcdir" ;;
26806   esac
26807
26808   case $INSTALL in
26809   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26810   *) ac_INSTALL=$ac_dots$INSTALL ;;
26811   esac
26812
26813   if test x"$ac_file" != x-; then
26814     { echo "$as_me:26814: creating $ac_file" >&5
26815 echo "$as_me: creating $ac_file" >&6;}
26816     rm -f "$ac_file"
26817   fi
26818   # Let's still pretend it is `configure' which instantiates (i.e., don't
26819   # use $as_me), people would be surprised to read:
26820   #    /* config.h.  Generated automatically by config.status.  */
26821   configure_input="Generated automatically from `echo $ac_file_in |
26822                                                  sed 's,.*/,,'` by configure."
26823
26824   # First look for the input files in the build tree, otherwise in the
26825   # src tree.
26826   ac_file_inputs=`IFS=:
26827     for f in $ac_file_in; do
26828       case $f in
26829       -) echo $tmp/stdin ;;
26830       [\\/$]*)
26831          # Absolute (can't be DOS-style, as IFS=:)
26832          test -f "$f" || { { echo "$as_me:26832: error: cannot find input file: $f" >&5
26833 echo "$as_me: error: cannot find input file: $f" >&2;}
26834    { (exit 1); exit 1; }; }
26835          echo $f;;
26836       *) # Relative
26837          if test -f "$f"; then
26838            # Build tree
26839            echo $f
26840          elif test -f "$srcdir/$f"; then
26841            # Source tree
26842            echo "$srcdir/$f"
26843          else
26844            # /dev/null tree
26845            { { echo "$as_me:26845: error: cannot find input file: $f" >&5
26846 echo "$as_me: error: cannot find input file: $f" >&2;}
26847    { (exit 1); exit 1; }; }
26848          fi;;
26849       esac
26850     done` || { (exit 1); exit 1; }
26851 EOF
26852 cat >>"$CONFIG_STATUS" <<\EOF
26853   ac_warn_datarootdir=no
26854   if test x"$ac_file" != x-; then
26855     for ac_item in $ac_file_inputs
26856     do
26857       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
26858       if test -n "$ac_seen"; then
26859         ac_used=`grep '@datarootdir@' "$ac_item"`
26860         if test -z "$ac_used"; then
26861           { echo "$as_me:26861: WARNING: datarootdir was used implicitly but not set:
26862 $ac_seen" >&5
26863 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26864 $ac_seen" >&2;}
26865           ac_warn_datarootdir=yes
26866         fi
26867       fi
26868       ac_seen=`grep '${datarootdir}' "$ac_item"`
26869       if test -n "$ac_seen"; then
26870         { echo "$as_me:26870: WARNING: datarootdir was used explicitly but not set:
26871 $ac_seen" >&5
26872 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26873 $ac_seen" >&2;}
26874         ac_warn_datarootdir=yes
26875       fi
26876     done
26877   fi
26878
26879 if test "x$ac_warn_datarootdir" = xyes; then
26880   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26881 fi
26882
26883 EOF
26884 cat >>"$CONFIG_STATUS" <<EOF
26885   sed "$ac_vpsub
26886 $extrasub
26887 EOF
26888 cat >>"$CONFIG_STATUS" <<\EOF
26889 :t
26890 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26891 s,@configure_input@,$configure_input,;t t
26892 s,@srcdir@,$ac_srcdir,;t t
26893 s,@top_srcdir@,$ac_top_srcdir,;t t
26894 s,@INSTALL@,$ac_INSTALL,;t t
26895 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26896   rm -f $tmp/stdin
26897   if test x"$ac_file" != x-; then
26898     cp "$tmp/out" "$ac_file"
26899
26900     for ac_name in prefix exec_prefix datarootdir
26901     do
26902         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
26903         if test -n "$ac_seen"; then
26904             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
26905             if test -z "$ac_init"; then
26906               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26907               { echo "$as_me:26907: WARNING: Variable $ac_name is used but was not set:
26908 $ac_seen" >&5
26909 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26910 $ac_seen" >&2;}
26911             fi
26912         fi
26913     done
26914     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
26915     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
26916     if test -s $tmp/out; then
26917       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
26918       { echo "$as_me:26918: WARNING: Some variables may not be substituted:
26919 $ac_seen" >&5
26920 echo "$as_me: WARNING: Some variables may not be substituted:
26921 $ac_seen" >&2;}
26922     fi
26923   else
26924     cat $tmp/out
26925   fi
26926   rm -f $tmp/out
26927
26928 done
26929 EOF
26930 cat >>"$CONFIG_STATUS" <<\EOF
26931
26932 #
26933 # CONFIG_HEADER section.
26934 #
26935
26936 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26937 # NAME is the cpp macro being defined and VALUE is the value it is being given.
26938 #
26939 # ac_d sets the value in "#define NAME VALUE" lines.
26940 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
26941 ac_dB='[        ].*$,\1#\2'
26942 ac_dC=' '
26943 ac_dD=',;t'
26944 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
26945 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26946 ac_iB='\([      ]\),\1#\2define\3'
26947 ac_iC=' '
26948 ac_iD='\4,;t'
26949 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26950 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26951 ac_uB='$,\1#\2define\3'
26952 ac_uC=' '
26953 ac_uD=',;t'
26954
26955 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26956   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26957   case "$ac_file" in
26958   - | *:- | *:-:* ) # input from stdin
26959         cat >$tmp/stdin
26960         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26961         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26962   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26963         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26964   * )   ac_file_in=$ac_file.in ;;
26965   esac
26966
26967   test x"$ac_file" != x- && { echo "$as_me:26967: creating $ac_file" >&5
26968 echo "$as_me: creating $ac_file" >&6;}
26969
26970   # First look for the input files in the build tree, otherwise in the
26971   # src tree.
26972   ac_file_inputs=`IFS=:
26973     for f in $ac_file_in; do
26974       case $f in
26975       -) echo $tmp/stdin ;;
26976       [\\/$]*)
26977          # Absolute (can't be DOS-style, as IFS=:)
26978          test -f "$f" || { { echo "$as_me:26978: error: cannot find input file: $f" >&5
26979 echo "$as_me: error: cannot find input file: $f" >&2;}
26980    { (exit 1); exit 1; }; }
26981          echo $f;;
26982       *) # Relative
26983          if test -f "$f"; then
26984            # Build tree
26985            echo $f
26986          elif test -f "$srcdir/$f"; then
26987            # Source tree
26988            echo "$srcdir/$f"
26989          else
26990            # /dev/null tree
26991            { { echo "$as_me:26991: error: cannot find input file: $f" >&5
26992 echo "$as_me: error: cannot find input file: $f" >&2;}
26993    { (exit 1); exit 1; }; }
26994          fi;;
26995       esac
26996     done` || { (exit 1); exit 1; }
26997   # Remove the trailing spaces.
26998   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
26999
27000 EOF
27001
27002 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27003 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27004 # be either 'cat' or 'sort'.
27005 sort -u confdefs.h | uniq >conftest.vals
27006
27007 # Break up conftest.vals because some shells have a limit on
27008 # the size of here documents, and old seds have small limits too.
27009
27010 rm -f conftest.tail
27011 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
27012 while grep . conftest.vals >/dev/null
27013 do
27014   # Write chunks of a limited-size here document to conftest.frag.
27015   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
27016   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
27017   echo 'CEOF' >> "$CONFIG_STATUS"
27018   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
27019   rm -f conftest.vals
27020   mv conftest.tail conftest.vals
27021 done
27022 rm -f conftest.vals
27023
27024 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27025 # marker @DEFS@.
27026 echo '  cat >> conftest.edit <<CEOF
27027 /@DEFS@/r conftest.frag
27028 /@DEFS@/d
27029 CEOF
27030 sed -f conftest.edit $tmp/in > $tmp/out
27031 rm -f $tmp/in
27032 mv $tmp/out $tmp/in
27033 rm -f conftest.edit conftest.frag
27034 ' >> "$CONFIG_STATUS"
27035
27036 cat >>"$CONFIG_STATUS" <<\EOF
27037   # Let's still pretend it is `configure' which instantiates (i.e., don't
27038   # use $as_me), people would be surprised to read:
27039   #    /* config.h.  Generated automatically by config.status.  */
27040   if test x"$ac_file" = x-; then
27041     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27042   else
27043     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27044   fi
27045   cat $tmp/in >>$tmp/config.h
27046   rm -f $tmp/in
27047   if test x"$ac_file" != x-; then
27048     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
27049       { echo "$as_me:27049: $ac_file is unchanged" >&5
27050 echo "$as_me: $ac_file is unchanged" >&6;}
27051     else
27052       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27053          X"$ac_file" : 'X\(//\)[^/]' \| \
27054          X"$ac_file" : 'X\(//\)$' \| \
27055          X"$ac_file" : 'X\(/\)' \| \
27056          .     : '\(.\)' 2>/dev/null ||
27057 echo X"$ac_file" |
27058     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27059           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27060           /^X\(\/\/\)$/{ s//\1/; q; }
27061           /^X\(\/\).*/{ s//\1/; q; }
27062           s/.*/./; q'`
27063       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27064         { case "$ac_dir" in
27065   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27066   *)                      as_incr_dir=.;;
27067 esac
27068 as_dummy="$ac_dir"
27069 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27070   case $as_mkdir_dir in
27071     # Skip DOS drivespec
27072     ?:) as_incr_dir=$as_mkdir_dir ;;
27073     *)
27074       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27075       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27076     ;;
27077   esac
27078 done; }
27079
27080       fi
27081       rm -f "$ac_file"
27082       mv "$tmp/config.h" "$ac_file"
27083     fi
27084   else
27085     cat $tmp/config.h
27086     rm -f $tmp/config.h
27087   fi
27088 done
27089 EOF
27090 cat >>"$CONFIG_STATUS" <<\EOF
27091 #
27092 # CONFIG_COMMANDS section.
27093 #
27094 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27095   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27096   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27097
27098   case "$ac_dest" in
27099     default-1 ) for ac_file in $CONFIG_FILES; do
27100
27101         # Support "outfile[:infile[:infile...]]"
27102         case "$ac_file" in
27103           (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
27104         esac
27105
27106         # PO directories have a Makefile.in generated from Makefile.inn.
27107         case "$ac_file" in
27108         (*/[Mm]akefile.in)
27109           # Adjust a relative srcdir.
27110           ac_dir="`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`"
27111           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
27112           ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
27113           ac_base="`basename $ac_file .in`"
27114           # In autoconf-2.13 it is called $ac_given_srcdir.
27115           # In autoconf-2.50 it is called $srcdir.
27116           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
27117
27118           case "$ac_given_srcdir" in
27119             (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
27120             (/*) top_srcdir="$ac_given_srcdir" ;;
27121             (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
27122           esac
27123
27124           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
27125             rm -f "$ac_dir/POTFILES"
27126             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
27127             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
27128             test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
27129             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
27130           fi
27131           ;;
27132         esac
27133       done ;;
27134     default )
27135
27136 cf_libname=\${LIB_BASENAME}
27137 cf_liblink=$cf_libname
27138 cf_libroot=$cf_libname
27139
27140 if test "x$cf_cv_do_symlinks" = xyes
27141 then
27142         case "x$cf_cv_shlib_version" in
27143         (xrel)
27144                 cf_liblink="\${LIB_ABI_NAME}"
27145                 cf_libname="\${LIB_REL_NAME}"
27146                 ;;
27147         (xabi)
27148                 cf_liblink="\${LIB_REL_NAME}"
27149                 cf_libname="\${LIB_ABI_NAME}"
27150                 ;;
27151         esac
27152 fi
27153 LIB_TARGET=$cf_libname
27154
27155 case x$LIB_MODEL in
27156 (xlibtool|xshared)
27157         cf_libdeps="\${LIBS} \${LDFLAGS}"
27158         ;;
27159 (x*)
27160         cf_libdeps=
27161         ;;
27162 esac
27163
27164 cat >>makefile <<CF_EOF
27165
27166 # generated by CF__ADD_SHLIB_RULES
27167 # libmodel: $LIB_MODEL
27168 # symlinks: $cf_cv_do_symlinks
27169 # shlibver: $cf_cv_shlib_version
27170
27171 CF_EOF
27172
27173 cat >>makefile <<CF_EOF
27174 $cf_libname :: \\
27175 CF_EOF
27176
27177 cat >>makefile <<CF_EOF
27178                 \${LIB_OBJECT}
27179         @echo linking \$@
27180         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27181 CF_EOF
27182
27183 if test "x$cf_cv_do_symlinks" = xyes
27184 then
27185 cat >>makefile <<CF_EOF
27186         \$(LN_S) $cf_libname $cf_liblink
27187         \$(LN_S) $cf_liblink $cf_libroot
27188 CF_EOF
27189 fi
27190
27191 cat >>makefile <<CF_EOF
27192
27193 install \\
27194 install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
27195
27196 \$(DESTDIR)\$(libdir)/$cf_libname :: \\
27197                 \$(DESTDIR)\$(libdir) \\
27198                 \${LIB_OBJECT}
27199         @echo linking \$@
27200         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27201 CF_EOF
27202
27203 if test "x$cf_cv_do_symlinks" = xyes
27204 then
27205 cat >>makefile <<CF_EOF
27206         cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
27207 CF_EOF
27208 fi
27209
27210 if test x$LIB_MODEL = xshared
27211 then
27212 cat >>makefile <<CF_EOF
27213         - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
27214 CF_EOF
27215 fi
27216
27217 cat >>makefile <<CF_EOF
27218
27219 uninstall \\
27220 uninstall.libs ::
27221         @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
27222 CF_EOF
27223
27224 if test "x$cf_cv_do_symlinks" = xyes
27225 then
27226 cat >>makefile <<CF_EOF
27227         -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
27228         -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
27229 CF_EOF
27230 fi
27231
27232 cat >>makefile <<CF_EOF
27233         -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
27234
27235 clean \\
27236 clean.libs ::
27237 CF_EOF
27238
27239 if test "x$cf_cv_do_symlinks" = xyes
27240 then
27241 cat >>makefile <<CF_EOF
27242         -rm -f $cf_libroot
27243         -rm -f $cf_liblink
27244 CF_EOF
27245 fi
27246
27247 cat >>makefile <<CF_EOF
27248         -rm -f $cf_libname
27249
27250 mostlyclean::
27251         -rm -f \${LIB_OBJECT}
27252 # end generated by CF__ADD_SHLIB_RULES
27253 CF_EOF
27254
27255  ;;
27256   esac
27257 done
27258 EOF
27259
27260 cat >>"$CONFIG_STATUS" <<\EOF
27261
27262 { (exit 0); exit 0; }
27263 EOF
27264 chmod +x "$CONFIG_STATUS"
27265 ac_clean_files=$ac_clean_files_save
27266
27267 # configure is writing to config.log, and then calls config.status.
27268 # config.status does its own redirection, appending to config.log.
27269 # Unfortunately, on DOS this fails, as config.log is still kept open
27270 # by configure, so config.status won't be able to write to it; its
27271 # output is simply discarded.  So we exec the FD to /dev/null,
27272 # effectively closing config.log, so it can be properly (re)opened and
27273 # appended to by config.status.  When coming back to configure, we
27274 # need to make the FD available again.
27275 if test "$no_create" != yes; then
27276   ac_cs_success=:
27277   exec 5>/dev/null
27278   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
27279   exec 5>>config.log
27280   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27281   # would make configure fail if this is the last instruction.
27282   "$ac_cs_success" || { (exit 1); exit 1; }
27283 fi
27284