]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/dialog/configure
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / dialog / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20121002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="dialog.h"
108 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 #  include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 #  include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 #  include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datarootdir='${prefix}/share'
174 datadir='${datarootdir}'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${datarootdir}/info'
182 mandir='${datarootdir}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234   | --dataroo | --dataro | --datar)
235     ac_prev=datarootdir ;;
236   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238     datarootdir=$ac_optarg ;;
239
240   -disable-* | --disable-*)
241     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242     # Reject names that are not valid shell variable names.
243     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245    { (exit 1); exit 1; }; }
246     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247     eval "enable_$ac_feature=no" ;;
248
249   -enable-* | --enable-*)
250     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251     # Reject names that are not valid shell variable names.
252     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254    { (exit 1); exit 1; }; }
255     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256     case $ac_option in
257       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258       *) ac_optarg=yes ;;
259     esac
260     eval "enable_$ac_feature='$ac_optarg'" ;;
261
262   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264   | --exec | --exe | --ex)
265     ac_prev=exec_prefix ;;
266   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268   | --exec=* | --exe=* | --ex=*)
269     exec_prefix=$ac_optarg ;;
270
271   -gas | --gas | --ga | --g)
272     # Obsolete; use --with-gas.
273     with_gas=yes ;;
274
275   -help | --help | --hel | --he | -h)
276     ac_init_help=long ;;
277   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278     ac_init_help=recursive ;;
279   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280     ac_init_help=short ;;
281
282   -host | --host | --hos | --ho)
283     ac_prev=host_alias ;;
284   -host=* | --host=* | --hos=* | --ho=*)
285     host_alias=$ac_optarg ;;
286
287   -includedir | --includedir | --includedi | --included | --include \
288   | --includ | --inclu | --incl | --inc)
289     ac_prev=includedir ;;
290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291   | --includ=* | --inclu=* | --incl=* | --inc=*)
292     includedir=$ac_optarg ;;
293
294   -infodir | --infodir | --infodi | --infod | --info | --inf)
295     ac_prev=infodir ;;
296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297     infodir=$ac_optarg ;;
298
299   -libdir | --libdir | --libdi | --libd)
300     ac_prev=libdir ;;
301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
302     libdir=$ac_optarg ;;
303
304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305   | --libexe | --libex | --libe)
306     ac_prev=libexecdir ;;
307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308   | --libexe=* | --libex=* | --libe=*)
309     libexecdir=$ac_optarg ;;
310
311   -localstatedir | --localstatedir | --localstatedi | --localstated \
312   | --localstate | --localstat | --localsta | --localst \
313   | --locals | --local | --loca | --loc | --lo)
314     ac_prev=localstatedir ;;
315   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318     localstatedir=$ac_optarg ;;
319
320   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321     ac_prev=mandir ;;
322   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323     mandir=$ac_optarg ;;
324
325   -nfp | --nfp | --nf)
326     # Obsolete; use --without-fp.
327     with_fp=no ;;
328
329   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330   | --no-cr | --no-c)
331     no_create=yes ;;
332
333   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335     no_recursion=yes ;;
336
337   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339   | --oldin | --oldi | --old | --ol | --o)
340     ac_prev=oldincludedir ;;
341   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344     oldincludedir=$ac_optarg ;;
345
346   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347     ac_prev=prefix ;;
348   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349     prefix=$ac_optarg ;;
350
351   -program-prefix | --program-prefix | --program-prefi | --program-pref \
352   | --program-pre | --program-pr | --program-p)
353     ac_prev=program_prefix ;;
354   -program-prefix=* | --program-prefix=* | --program-prefi=* \
355   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356     program_prefix=$ac_optarg ;;
357
358   -program-suffix | --program-suffix | --program-suffi | --program-suff \
359   | --program-suf | --program-su | --program-s)
360     ac_prev=program_suffix ;;
361   -program-suffix=* | --program-suffix=* | --program-suffi=* \
362   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363     program_suffix=$ac_optarg ;;
364
365   -program-transform-name | --program-transform-name \
366   | --program-transform-nam | --program-transform-na \
367   | --program-transform-n | --program-transform- \
368   | --program-transform | --program-transfor \
369   | --program-transfo | --program-transf \
370   | --program-trans | --program-tran \
371   | --progr-tra | --program-tr | --program-t)
372     ac_prev=program_transform_name ;;
373   -program-transform-name=* | --program-transform-name=* \
374   | --program-transform-nam=* | --program-transform-na=* \
375   | --program-transform-n=* | --program-transform-=* \
376   | --program-transform=* | --program-transfor=* \
377   | --program-transfo=* | --program-transf=* \
378   | --program-trans=* | --program-tran=* \
379   | --progr-tra=* | --program-tr=* | --program-t=*)
380     program_transform_name=$ac_optarg ;;
381
382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383   | -silent | --silent | --silen | --sile | --sil)
384     silent=yes ;;
385
386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387     ac_prev=sbindir ;;
388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389   | --sbi=* | --sb=*)
390     sbindir=$ac_optarg ;;
391
392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394   | --sharedst | --shareds | --shared | --share | --shar \
395   | --sha | --sh)
396     ac_prev=sharedstatedir ;;
397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400   | --sha=* | --sh=*)
401     sharedstatedir=$ac_optarg ;;
402
403   -site | --site | --sit)
404     ac_prev=site ;;
405   -site=* | --site=* | --sit=*)
406     site=$ac_optarg ;;
407
408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409     ac_prev=srcdir ;;
410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411     srcdir=$ac_optarg ;;
412
413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414   | --syscon | --sysco | --sysc | --sys | --sy)
415     ac_prev=sysconfdir ;;
416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418     sysconfdir=$ac_optarg ;;
419
420   -target | --target | --targe | --targ | --tar | --ta | --t)
421     ac_prev=target_alias ;;
422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423     target_alias=$ac_optarg ;;
424
425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
426     verbose=yes ;;
427
428   -version | --version | --versio | --versi | --vers | -V)
429     ac_init_version=: ;;
430
431   -with-* | --with-*)
432     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433     # Reject names that are not valid shell variable names.
434     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435       { echo "$as_me: error: invalid package name: $ac_package" >&2
436    { (exit 1); exit 1; }; }
437     ac_package=`echo $ac_package| sed 's/-/_/g'`
438     case $ac_option in
439       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440       *) ac_optarg=yes ;;
441     esac
442     eval "with_$ac_package='$ac_optarg'" ;;
443
444   -without-* | --without-*)
445     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo $ac_package | sed 's/-/_/g'`
451     eval "with_$ac_package=no" ;;
452
453   --x)
454     # Obsolete; use --with-x.
455     with_x=yes ;;
456
457   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458   | --x-incl | --x-inc | --x-in | --x-i)
459     ac_prev=x_includes ;;
460   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462     x_includes=$ac_optarg ;;
463
464   -x-libraries | --x-libraries | --x-librarie | --x-librari \
465   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466     ac_prev=x_libraries ;;
467   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469     x_libraries=$ac_optarg ;;
470
471   -*) { echo "$as_me: error: unrecognized option: $ac_option
472 Try \`$0 --help' for more information." >&2
473    { (exit 1); exit 1; }; }
474     ;;
475
476   *=*)
477     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478     # Reject names that are not valid shell variable names.
479     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481    { (exit 1); exit 1; }; }
482     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483     eval "$ac_envvar='$ac_optarg'"
484     export $ac_envvar ;;
485
486   *)
487     # FIXME: should be removed in autoconf 3.0.
488     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492     ;;
493
494   esac
495 done
496
497 if test -n "$ac_prev"; then
498   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499   { echo "$as_me: error: missing argument to $ac_option" >&2
500    { (exit 1); exit 1; }; }
501 fi
502
503 # Be sure to have absolute paths.
504 for ac_var in exec_prefix prefix
505 do
506   eval ac_val=$`echo $ac_var`
507   case $ac_val in
508     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510    { (exit 1); exit 1; }; };;
511   esac
512 done
513
514 # Be sure to have absolute paths.
515 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516               localstatedir libdir includedir oldincludedir infodir mandir
517 do
518   eval ac_val=$`echo $ac_var`
519   case $ac_val in
520     [\\/$]* | ?:[\\/]* ) ;;
521     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522    { (exit 1); exit 1; }; };;
523   esac
524 done
525
526 # There might be people who depend on the old broken behavior: `$host'
527 # used to hold the argument of --host etc.
528 build=$build_alias
529 host=$host_alias
530 target=$target_alias
531
532 # FIXME: should be removed in autoconf 3.0.
533 if test "x$host_alias" != x; then
534   if test "x$build_alias" = x; then
535     cross_compiling=maybe
536     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537     If a cross compiler is detected then cross compile mode will be used." >&2
538   elif test "x$build_alias" != "x$host_alias"; then
539     cross_compiling=yes
540   fi
541 fi
542
543 ac_tool_prefix=
544 test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546 test "$silent" = yes && exec 6>/dev/null
547
548 # Find the source files, if location was not specified.
549 if test -z "$srcdir"; then
550   ac_srcdir_defaulted=yes
551   # Try the directory containing this script, then its parent.
552   ac_prog=$0
553   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555   srcdir=$ac_confdir
556   if test ! -r $srcdir/$ac_unique_file; then
557     srcdir=..
558   fi
559 else
560   ac_srcdir_defaulted=no
561 fi
562 if test ! -r $srcdir/$ac_unique_file; then
563   if test "$ac_srcdir_defaulted" = yes; then
564     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565    { (exit 1); exit 1; }; }
566   else
567     { echo "$as_me: error: cannot find sources in $srcdir" >&2
568    { (exit 1); exit 1; }; }
569   fi
570 fi
571 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572 ac_env_build_alias_set=${build_alias+set}
573 ac_env_build_alias_value=$build_alias
574 ac_cv_env_build_alias_set=${build_alias+set}
575 ac_cv_env_build_alias_value=$build_alias
576 ac_env_host_alias_set=${host_alias+set}
577 ac_env_host_alias_value=$host_alias
578 ac_cv_env_host_alias_set=${host_alias+set}
579 ac_cv_env_host_alias_value=$host_alias
580 ac_env_target_alias_set=${target_alias+set}
581 ac_env_target_alias_value=$target_alias
582 ac_cv_env_target_alias_set=${target_alias+set}
583 ac_cv_env_target_alias_value=$target_alias
584 ac_env_CC_set=${CC+set}
585 ac_env_CC_value=$CC
586 ac_cv_env_CC_set=${CC+set}
587 ac_cv_env_CC_value=$CC
588 ac_env_CFLAGS_set=${CFLAGS+set}
589 ac_env_CFLAGS_value=$CFLAGS
590 ac_cv_env_CFLAGS_set=${CFLAGS+set}
591 ac_cv_env_CFLAGS_value=$CFLAGS
592 ac_env_LDFLAGS_set=${LDFLAGS+set}
593 ac_env_LDFLAGS_value=$LDFLAGS
594 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595 ac_cv_env_LDFLAGS_value=$LDFLAGS
596 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597 ac_env_CPPFLAGS_value=$CPPFLAGS
598 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600 ac_env_CPP_set=${CPP+set}
601 ac_env_CPP_value=$CPP
602 ac_cv_env_CPP_set=${CPP+set}
603 ac_cv_env_CPP_value=$CPP
604
605 #
606 # Report the --help message.
607 #
608 if test "$ac_init_help" = "long"; then
609   # Omit some internal or obsolete options to make the list less imposing.
610   # This message is too long to be a string in the A/UX 3.1 sh.
611   cat <<EOF
612 \`configure' configures this package to adapt to many kinds of systems.
613
614 Usage: $0 [OPTION]... [VAR=VALUE]...
615
616 To assign environment variables (e.g., CC, CFLAGS...), specify them as
617 VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619 Defaults for the options are specified in brackets.
620
621 Configuration:
622   -h, --help              display this help and exit
623       --help=short        display options specific to this package
624       --help=recursive    display the short help of all the included packages
625   -V, --version           display version information and exit
626   -q, --quiet, --silent   do not print \`checking...' messages
627       --cache-file=FILE   cache test results in FILE [disabled]
628   -C, --config-cache      alias for \`--cache-file=config.cache'
629   -n, --no-create         do not create output files
630       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632 EOF
633
634   cat <<EOF
635 Installation directories:
636   --prefix=PREFIX         install architecture-independent files in PREFIX
637                           [$ac_default_prefix]
638   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                           [PREFIX]
640
641 By default, \`make install' will install all the files in
642 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644 for instance \`--prefix=\$HOME'.
645
646 For better control, use the options below.
647
648 Fine tuning of the installation directories:
649   --bindir=DIR            user executables [EPREFIX/bin]
650   --sbindir=DIR           system admin executables [EPREFIX/sbin]
651   --libexecdir=DIR        program executables [EPREFIX/libexec]
652   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657   --libdir=DIR            object code libraries [EPREFIX/lib]
658   --includedir=DIR        C header files [PREFIX/include]
659   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660   --infodir=DIR           info documentation [DATAROOTDIR/info]
661   --mandir=DIR            man documentation [DATAROOTDIR/man]
662 EOF
663
664   cat <<\EOF
665
666 Program names:
667   --program-prefix=PREFIX            prepend PREFIX to installed program names
668   --program-suffix=SUFFIX            append SUFFIX to installed program names
669   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671 System types:
672   --build=BUILD           configure for building on BUILD [guessed]
673   --host=HOST       build programs to run on HOST [BUILD]
674 EOF
675 fi
676
677 if test -n "$ac_init_help"; then
678
679   cat <<\EOF
680
681 Optional Features:
682   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
683   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
684
685 Optional Packages:
686   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
687   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
688
689   --disable-echo          do not display "compiling" commands
690   --disable-largefile     omit support for large files
691   --with-warnings         test: turn on gcc warnings
692   --with-pkg-config{=path} enable/disable use of pkg-config
693   --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
694   --enable-header-subdir  install dlg_XXX headers to subdirectory
695   --with-libiconv-prefix=DIR
696                           search for libiconv in DIR/include and DIR/lib
697   --enable-nls            use Native Language Support
698   --with-included-gettext use the GNU gettext library included here
699   --with-textdomain=PKG   NLS text-domain (default is package name)
700   --disable-included-msgs use included messages, for i18n support
701   --with-dmalloc          test: use Gray Watson's dmalloc library
702   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
703   --with-purify           test: use Purify
704   --with-valgrind         test: use valgrind
705   --with-no-leaks         test: free permanent memory, analyze leaks
706   --disable-trace         do not support --trace option
707   --with-rel-version=XXX  override derived release version
708   --with-abi-version=XXX  override derived ABI version
709   --disable-libtool-version  enable to use libtool's incompatible naming scheme
710   --with-libtool          generate libraries with libtool
711   --with-libtool-opts=XXX specify additional libtool options
712   --with-shared           generate shared-libraries
713   --with-shlib-version=X  Specify rel or abi version for shared libs
714   --with-curses-dir=DIR   directory in which (n)curses is installed
715   --enable-rpath          use rpath option when generating shared libraries
716   --with-ncurses          compile/link with ncurses library
717   --with-ncursesw         compile/link with wide-char ncurses library
718   --disable-extras        do not include extra dialogs
719   --disable-rc-file       do not include config-file support
720   --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
721   --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
722   --disable-whiptail      do not map extra whiptail options
723   --disable-form          do not include the form dialog
724   --disable-gauge         do not include the gauge dialogs
725   --disable-tailbox       do not include the tailbox dialog
726   --disable-mixedform     do not include the mixedform dialog
727   --disable-mixedgauge    do not include the mixedgauge dialog
728   --enable-widec          enable wide-curses features
729   --disable-rpath-hack    don't add rpath options for additional libraries
730
731 Some influential environment variables:
732   CC          C compiler command
733   CFLAGS      C compiler flags
734   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
735               nonstandard directory <lib dir>
736   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
737               headers in a nonstandard directory <include dir>
738   CPP         C preprocessor
739
740 Use these variables to override the choices made by `configure' or to help
741 it to find libraries and programs with nonstandard names/locations.
742
743 EOF
744 fi
745
746 if test "$ac_init_help" = "recursive"; then
747   # If there are subdirs, report their specific --help.
748   ac_popdir=`pwd`
749   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
750     cd $ac_subdir
751     # A "../" for each directory in /$ac_subdir.
752     ac_dots=`echo $ac_subdir |
753              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
754
755     case $srcdir in
756     .) # No --srcdir option.  We are building in place.
757       ac_sub_srcdir=$srcdir ;;
758     [\\/]* | ?:[\\/]* ) # Absolute path.
759       ac_sub_srcdir=$srcdir/$ac_subdir ;;
760     *) # Relative path.
761       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
762     esac
763
764     # Check for guested configure; otherwise get Cygnus style configure.
765     if test -f $ac_sub_srcdir/configure.gnu; then
766       echo
767       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
768     elif test -f $ac_sub_srcdir/configure; then
769       echo
770       $SHELL $ac_sub_srcdir/configure  --help=recursive
771     elif test -f $ac_sub_srcdir/configure.ac ||
772            test -f $ac_sub_srcdir/configure.in; then
773       echo
774       $ac_configure --help
775     else
776       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
777     fi
778     cd $ac_popdir
779   done
780 fi
781
782 test -n "$ac_init_help" && exit 0
783 if $ac_init_version; then
784   cat <<\EOF
785
786 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
787 Free Software Foundation, Inc.
788 This configure script is free software; the Free Software Foundation
789 gives unlimited permission to copy, distribute and modify it.
790 EOF
791   exit 0
792 fi
793 exec 5>config.log
794 cat >&5 <<EOF
795 This file contains any messages produced by compilers while
796 running configure, to aid debugging if configure makes a mistake.
797
798 It was created by $as_me, which was
799 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
800
801   $ $0 $@
802
803 EOF
804 {
805 cat <<_ASUNAME
806 ## ---------- ##
807 ## Platform.  ##
808 ## ---------- ##
809
810 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
811 uname -m = `(uname -m) 2>/dev/null || echo unknown`
812 uname -r = `(uname -r) 2>/dev/null || echo unknown`
813 uname -s = `(uname -s) 2>/dev/null || echo unknown`
814 uname -v = `(uname -v) 2>/dev/null || echo unknown`
815
816 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
817 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
818
819 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
820 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
821 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
822 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
823 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
824 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
825 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
826
827 PATH = $PATH
828
829 _ASUNAME
830 } >&5
831
832 cat >&5 <<EOF
833 ## ------------ ##
834 ## Core tests.  ##
835 ## ------------ ##
836
837 EOF
838
839 # Keep a trace of the command line.
840 # Strip out --no-create and --no-recursion so they do not pile up.
841 # Also quote any args containing shell meta-characters.
842 ac_configure_args=
843 ac_sep=
844 for ac_arg
845 do
846   case $ac_arg in
847   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
848   | --no-cr | --no-c) ;;
849   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
850   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
851   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
852     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
853     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
854     ac_sep=" " ;;
855   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
856      ac_sep=" " ;;
857   esac
858   # Get rid of the leading space.
859 done
860
861 # When interrupted or exit'd, cleanup temporary files, and complete
862 # config.log.  We remove comments because anyway the quotes in there
863 # would cause problems or look ugly.
864 trap 'exit_status=$?
865   # Save into config.log some information that might help in debugging.
866   echo >&5
867   echo "## ----------------- ##" >&5
868   echo "## Cache variables.  ##" >&5
869   echo "## ----------------- ##" >&5
870   echo >&5
871   # The following way of writing the cache mishandles newlines in values,
872 {
873   (set) 2>&1 |
874     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
875     *ac_space=\ *)
876       sed -n \
877         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
878           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
879       ;;
880     *)
881       sed -n \
882         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
883       ;;
884     esac;
885 } >&5
886   sed "/^$/d" confdefs.h >conftest.log
887   if test -s conftest.log; then
888     echo >&5
889     echo "## ------------ ##" >&5
890     echo "## confdefs.h.  ##" >&5
891     echo "## ------------ ##" >&5
892     echo >&5
893     cat conftest.log >&5
894   fi
895   (echo; echo) >&5
896   test "$ac_signal" != 0 &&
897     echo "$as_me: caught signal $ac_signal" >&5
898   echo "$as_me: exit $exit_status" >&5
899   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
900     exit $exit_status
901      ' 0
902 for ac_signal in 1 2 13 15; do
903   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
904 done
905 ac_signal=0
906
907 # confdefs.h avoids OS command line length limits that DEFS can exceed.
908 rm -rf conftest* confdefs.h
909 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
910 echo >confdefs.h
911
912 # Let the site file select an alternate cache file if it wants to.
913 # Prefer explicitly selected file to automatically selected ones.
914 if test -z "$CONFIG_SITE"; then
915   if test "x$prefix" != xNONE; then
916     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
917   else
918     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
919   fi
920 fi
921 for ac_site_file in $CONFIG_SITE; do
922   if test -r "$ac_site_file"; then
923     { echo "$as_me:923: loading site script $ac_site_file" >&5
924 echo "$as_me: loading site script $ac_site_file" >&6;}
925     cat "$ac_site_file" >&5
926     . "$ac_site_file"
927   fi
928 done
929
930 if test -r "$cache_file"; then
931   # Some versions of bash will fail to source /dev/null (special
932   # files actually), so we avoid doing that.
933   if test -f "$cache_file"; then
934     { echo "$as_me:934: loading cache $cache_file" >&5
935 echo "$as_me: loading cache $cache_file" >&6;}
936     case $cache_file in
937       [\\/]* | ?:[\\/]* ) . $cache_file;;
938       *)                      . ./$cache_file;;
939     esac
940   fi
941 else
942   { echo "$as_me:942: creating cache $cache_file" >&5
943 echo "$as_me: creating cache $cache_file" >&6;}
944   >$cache_file
945 fi
946
947 # Check that the precious variables saved in the cache have kept the same
948 # value.
949 ac_cache_corrupted=false
950 for ac_var in `(set) 2>&1 |
951                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
952   eval ac_old_set=\$ac_cv_env_${ac_var}_set
953   eval ac_new_set=\$ac_env_${ac_var}_set
954   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
955   eval ac_new_val="\$ac_env_${ac_var}_value"
956   case $ac_old_set,$ac_new_set in
957     set,)
958       { echo "$as_me:958: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
959 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
960       ac_cache_corrupted=: ;;
961     ,set)
962       { echo "$as_me:962: error: \`$ac_var' was not set in the previous run" >&5
963 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
964       ac_cache_corrupted=: ;;
965     ,);;
966     *)
967       if test "x$ac_old_val" != "x$ac_new_val"; then
968         { echo "$as_me:968: error: \`$ac_var' has changed since the previous run:" >&5
969 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
970         { echo "$as_me:970:   former value:  $ac_old_val" >&5
971 echo "$as_me:   former value:  $ac_old_val" >&2;}
972         { echo "$as_me:972:   current value: $ac_new_val" >&5
973 echo "$as_me:   current value: $ac_new_val" >&2;}
974         ac_cache_corrupted=:
975       fi;;
976   esac
977   # Pass precious variables to config.status.  It doesn't matter if
978   # we pass some twice (in addition to the command line arguments).
979   if test "$ac_new_set" = set; then
980     case $ac_new_val in
981     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
982       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
983       ac_configure_args="$ac_configure_args '$ac_arg'"
984       ;;
985     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
986        ;;
987     esac
988   fi
989 done
990 if $ac_cache_corrupted; then
991   { echo "$as_me:991: error: changes in the environment can compromise the build" >&5
992 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
993   { { echo "$as_me:993: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
994 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
995    { (exit 1); exit 1; }; }
996 fi
997
998 ac_ext=c
999 ac_cpp='$CPP $CPPFLAGS'
1000 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1001 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1003 ac_main_return=return
1004
1005 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1006   *c*,-n*) ECHO_N= ECHO_C='
1007 ' ECHO_T='      ' ;;
1008   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1009   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1010 esac
1011 echo "#! $SHELL" >conftest.sh
1012 echo  "exit 0"   >>conftest.sh
1013 chmod +x conftest.sh
1014 if { (echo "$as_me:1014: PATH=\".;.\"; conftest.sh") >&5
1015   (PATH=".;."; conftest.sh) 2>&5
1016   ac_status=$?
1017   echo "$as_me:1017: \$? = $ac_status" >&5
1018   (exit $ac_status); }; then
1019   ac_path_separator=';'
1020 else
1021   ac_path_separator=:
1022 fi
1023 PATH_SEPARATOR="$ac_path_separator"
1024 rm -f conftest.sh
1025
1026 ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1027
1028 test "$program_prefix" != NONE &&
1029   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1030 # Use a double $ so make ignores it.
1031 test "$program_suffix" != NONE &&
1032   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1033 # Double any \ or $.  echo might interpret backslashes.
1034 # By default was `s,x,x', remove it if useless.
1035 cat <<\_ACEOF >conftest.sed
1036 s/[\\$]/&&/g;s/;s,x,x,$//
1037 _ACEOF
1038 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1039 rm conftest.sed
1040
1041 DESTDIR=
1042
1043 ac_ext=c
1044 ac_cpp='$CPP $CPPFLAGS'
1045 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1046 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1047 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1048 ac_main_return=return
1049 if test -n "$ac_tool_prefix"; then
1050   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1051 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1052 echo "$as_me:1052: checking for $ac_word" >&5
1053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1054 if test "${ac_cv_prog_CC+set}" = set; then
1055   echo $ECHO_N "(cached) $ECHO_C" >&6
1056 else
1057   if test -n "$CC"; then
1058   ac_cv_prog_CC="$CC" # Let the user override the test.
1059 else
1060   ac_save_IFS=$IFS; IFS=$ac_path_separator
1061 ac_dummy="$PATH"
1062 for ac_dir in $ac_dummy; do
1063   IFS=$ac_save_IFS
1064   test -z "$ac_dir" && ac_dir=.
1065   $as_executable_p "$ac_dir/$ac_word" || continue
1066 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1067 echo "$as_me:1067: found $ac_dir/$ac_word" >&5
1068 break
1069 done
1070
1071 fi
1072 fi
1073 CC=$ac_cv_prog_CC
1074 if test -n "$CC"; then
1075   echo "$as_me:1075: result: $CC" >&5
1076 echo "${ECHO_T}$CC" >&6
1077 else
1078   echo "$as_me:1078: result: no" >&5
1079 echo "${ECHO_T}no" >&6
1080 fi
1081
1082 fi
1083 if test -z "$ac_cv_prog_CC"; then
1084   ac_ct_CC=$CC
1085   # Extract the first word of "gcc", so it can be a program name with args.
1086 set dummy gcc; ac_word=$2
1087 echo "$as_me:1087: checking for $ac_word" >&5
1088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1089 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1090   echo $ECHO_N "(cached) $ECHO_C" >&6
1091 else
1092   if test -n "$ac_ct_CC"; then
1093   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1094 else
1095   ac_save_IFS=$IFS; IFS=$ac_path_separator
1096 ac_dummy="$PATH"
1097 for ac_dir in $ac_dummy; do
1098   IFS=$ac_save_IFS
1099   test -z "$ac_dir" && ac_dir=.
1100   $as_executable_p "$ac_dir/$ac_word" || continue
1101 ac_cv_prog_ac_ct_CC="gcc"
1102 echo "$as_me:1102: found $ac_dir/$ac_word" >&5
1103 break
1104 done
1105
1106 fi
1107 fi
1108 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1109 if test -n "$ac_ct_CC"; then
1110   echo "$as_me:1110: result: $ac_ct_CC" >&5
1111 echo "${ECHO_T}$ac_ct_CC" >&6
1112 else
1113   echo "$as_me:1113: result: no" >&5
1114 echo "${ECHO_T}no" >&6
1115 fi
1116
1117   CC=$ac_ct_CC
1118 else
1119   CC="$ac_cv_prog_CC"
1120 fi
1121
1122 if test -z "$CC"; then
1123   if test -n "$ac_tool_prefix"; then
1124   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1125 set dummy ${ac_tool_prefix}cc; ac_word=$2
1126 echo "$as_me:1126: checking for $ac_word" >&5
1127 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1128 if test "${ac_cv_prog_CC+set}" = set; then
1129   echo $ECHO_N "(cached) $ECHO_C" >&6
1130 else
1131   if test -n "$CC"; then
1132   ac_cv_prog_CC="$CC" # Let the user override the test.
1133 else
1134   ac_save_IFS=$IFS; IFS=$ac_path_separator
1135 ac_dummy="$PATH"
1136 for ac_dir in $ac_dummy; do
1137   IFS=$ac_save_IFS
1138   test -z "$ac_dir" && ac_dir=.
1139   $as_executable_p "$ac_dir/$ac_word" || continue
1140 ac_cv_prog_CC="${ac_tool_prefix}cc"
1141 echo "$as_me:1141: found $ac_dir/$ac_word" >&5
1142 break
1143 done
1144
1145 fi
1146 fi
1147 CC=$ac_cv_prog_CC
1148 if test -n "$CC"; then
1149   echo "$as_me:1149: result: $CC" >&5
1150 echo "${ECHO_T}$CC" >&6
1151 else
1152   echo "$as_me:1152: result: no" >&5
1153 echo "${ECHO_T}no" >&6
1154 fi
1155
1156 fi
1157 if test -z "$ac_cv_prog_CC"; then
1158   ac_ct_CC=$CC
1159   # Extract the first word of "cc", so it can be a program name with args.
1160 set dummy cc; ac_word=$2
1161 echo "$as_me:1161: checking for $ac_word" >&5
1162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1163 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1164   echo $ECHO_N "(cached) $ECHO_C" >&6
1165 else
1166   if test -n "$ac_ct_CC"; then
1167   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1168 else
1169   ac_save_IFS=$IFS; IFS=$ac_path_separator
1170 ac_dummy="$PATH"
1171 for ac_dir in $ac_dummy; do
1172   IFS=$ac_save_IFS
1173   test -z "$ac_dir" && ac_dir=.
1174   $as_executable_p "$ac_dir/$ac_word" || continue
1175 ac_cv_prog_ac_ct_CC="cc"
1176 echo "$as_me:1176: found $ac_dir/$ac_word" >&5
1177 break
1178 done
1179
1180 fi
1181 fi
1182 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1183 if test -n "$ac_ct_CC"; then
1184   echo "$as_me:1184: result: $ac_ct_CC" >&5
1185 echo "${ECHO_T}$ac_ct_CC" >&6
1186 else
1187   echo "$as_me:1187: result: no" >&5
1188 echo "${ECHO_T}no" >&6
1189 fi
1190
1191   CC=$ac_ct_CC
1192 else
1193   CC="$ac_cv_prog_CC"
1194 fi
1195
1196 fi
1197 if test -z "$CC"; then
1198   # Extract the first word of "cc", so it can be a program name with args.
1199 set dummy cc; ac_word=$2
1200 echo "$as_me:1200: checking for $ac_word" >&5
1201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1202 if test "${ac_cv_prog_CC+set}" = set; then
1203   echo $ECHO_N "(cached) $ECHO_C" >&6
1204 else
1205   if test -n "$CC"; then
1206   ac_cv_prog_CC="$CC" # Let the user override the test.
1207 else
1208   ac_prog_rejected=no
1209   ac_save_IFS=$IFS; IFS=$ac_path_separator
1210 ac_dummy="$PATH"
1211 for ac_dir in $ac_dummy; do
1212   IFS=$ac_save_IFS
1213   test -z "$ac_dir" && ac_dir=.
1214   $as_executable_p "$ac_dir/$ac_word" || continue
1215 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1216   ac_prog_rejected=yes
1217   continue
1218 fi
1219 ac_cv_prog_CC="cc"
1220 echo "$as_me:1220: found $ac_dir/$ac_word" >&5
1221 break
1222 done
1223
1224 if test $ac_prog_rejected = yes; then
1225   # We found a bogon in the path, so make sure we never use it.
1226   set dummy $ac_cv_prog_CC
1227   shift
1228   if test $# != 0; then
1229     # We chose a different compiler from the bogus one.
1230     # However, it has the same basename, so the bogon will be chosen
1231     # first if we set CC to just the basename; use the full file name.
1232     shift
1233     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1234     shift
1235     ac_cv_prog_CC="$@"
1236   fi
1237 fi
1238 fi
1239 fi
1240 CC=$ac_cv_prog_CC
1241 if test -n "$CC"; then
1242   echo "$as_me:1242: result: $CC" >&5
1243 echo "${ECHO_T}$CC" >&6
1244 else
1245   echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1247 fi
1248
1249 fi
1250 if test -z "$CC"; then
1251   if test -n "$ac_tool_prefix"; then
1252   for ac_prog in cl
1253   do
1254     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1255 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1256 echo "$as_me:1256: checking for $ac_word" >&5
1257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1258 if test "${ac_cv_prog_CC+set}" = set; then
1259   echo $ECHO_N "(cached) $ECHO_C" >&6
1260 else
1261   if test -n "$CC"; then
1262   ac_cv_prog_CC="$CC" # Let the user override the test.
1263 else
1264   ac_save_IFS=$IFS; IFS=$ac_path_separator
1265 ac_dummy="$PATH"
1266 for ac_dir in $ac_dummy; do
1267   IFS=$ac_save_IFS
1268   test -z "$ac_dir" && ac_dir=.
1269   $as_executable_p "$ac_dir/$ac_word" || continue
1270 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1271 echo "$as_me:1271: found $ac_dir/$ac_word" >&5
1272 break
1273 done
1274
1275 fi
1276 fi
1277 CC=$ac_cv_prog_CC
1278 if test -n "$CC"; then
1279   echo "$as_me:1279: result: $CC" >&5
1280 echo "${ECHO_T}$CC" >&6
1281 else
1282   echo "$as_me:1282: result: no" >&5
1283 echo "${ECHO_T}no" >&6
1284 fi
1285
1286     test -n "$CC" && break
1287   done
1288 fi
1289 if test -z "$CC"; then
1290   ac_ct_CC=$CC
1291   for ac_prog in cl
1292 do
1293   # Extract the first word of "$ac_prog", so it can be a program name with args.
1294 set dummy $ac_prog; ac_word=$2
1295 echo "$as_me:1295: checking for $ac_word" >&5
1296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1297 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1298   echo $ECHO_N "(cached) $ECHO_C" >&6
1299 else
1300   if test -n "$ac_ct_CC"; then
1301   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1302 else
1303   ac_save_IFS=$IFS; IFS=$ac_path_separator
1304 ac_dummy="$PATH"
1305 for ac_dir in $ac_dummy; do
1306   IFS=$ac_save_IFS
1307   test -z "$ac_dir" && ac_dir=.
1308   $as_executable_p "$ac_dir/$ac_word" || continue
1309 ac_cv_prog_ac_ct_CC="$ac_prog"
1310 echo "$as_me:1310: found $ac_dir/$ac_word" >&5
1311 break
1312 done
1313
1314 fi
1315 fi
1316 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1317 if test -n "$ac_ct_CC"; then
1318   echo "$as_me:1318: result: $ac_ct_CC" >&5
1319 echo "${ECHO_T}$ac_ct_CC" >&6
1320 else
1321   echo "$as_me:1321: result: no" >&5
1322 echo "${ECHO_T}no" >&6
1323 fi
1324
1325   test -n "$ac_ct_CC" && break
1326 done
1327
1328   CC=$ac_ct_CC
1329 fi
1330
1331 fi
1332
1333 test -z "$CC" && { { echo "$as_me:1333: error: no acceptable cc found in \$PATH" >&5
1334 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1335    { (exit 1); exit 1; }; }
1336
1337 # Provide some information about the compiler.
1338 echo "$as_me:1338:" \
1339      "checking for C compiler version" >&5
1340 ac_compiler=`set X $ac_compile; echo $2`
1341 { (eval echo "$as_me:1341: \"$ac_compiler --version </dev/null >&5\"") >&5
1342   (eval $ac_compiler --version </dev/null >&5) 2>&5
1343   ac_status=$?
1344   echo "$as_me:1344: \$? = $ac_status" >&5
1345   (exit $ac_status); }
1346 { (eval echo "$as_me:1346: \"$ac_compiler -v </dev/null >&5\"") >&5
1347   (eval $ac_compiler -v </dev/null >&5) 2>&5
1348   ac_status=$?
1349   echo "$as_me:1349: \$? = $ac_status" >&5
1350   (exit $ac_status); }
1351 { (eval echo "$as_me:1351: \"$ac_compiler -V </dev/null >&5\"") >&5
1352   (eval $ac_compiler -V </dev/null >&5) 2>&5
1353   ac_status=$?
1354   echo "$as_me:1354: \$? = $ac_status" >&5
1355   (exit $ac_status); }
1356
1357 cat >conftest.$ac_ext <<_ACEOF
1358 #line 1358 "configure"
1359 #include "confdefs.h"
1360
1361 int
1362 main ()
1363 {
1364
1365   ;
1366   return 0;
1367 }
1368 _ACEOF
1369 ac_clean_files_save=$ac_clean_files
1370 ac_clean_files="$ac_clean_files a.out a.exe"
1371 # Try to create an executable without -o first, disregard a.out.
1372 # It will help us diagnose broken compilers, and finding out an intuition
1373 # of exeext.
1374 echo "$as_me:1374: checking for C compiler default output" >&5
1375 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1376 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1377 if { (eval echo "$as_me:1377: \"$ac_link_default\"") >&5
1378   (eval $ac_link_default) 2>&5
1379   ac_status=$?
1380   echo "$as_me:1380: \$? = $ac_status" >&5
1381   (exit $ac_status); }; then
1382   # Find the output, starting from the most likely.  This scheme is
1383 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1384 # resort.
1385 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1386                 ls a.out conftest 2>/dev/null;
1387                 ls a.* conftest.* 2>/dev/null`; do
1388   case $ac_file in
1389     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1390     a.out ) # We found the default executable, but exeext='' is most
1391             # certainly right.
1392             break;;
1393     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1394           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1395           export ac_cv_exeext
1396           break;;
1397     * ) break;;
1398   esac
1399 done
1400 else
1401   echo "$as_me: failed program was:" >&5
1402 cat conftest.$ac_ext >&5
1403 { { echo "$as_me:1403: error: C compiler cannot create executables" >&5
1404 echo "$as_me: error: C compiler cannot create executables" >&2;}
1405    { (exit 77); exit 77; }; }
1406 fi
1407
1408 ac_exeext=$ac_cv_exeext
1409 echo "$as_me:1409: result: $ac_file" >&5
1410 echo "${ECHO_T}$ac_file" >&6
1411
1412 # Check the compiler produces executables we can run.  If not, either
1413 # the compiler is broken, or we cross compile.
1414 echo "$as_me:1414: checking whether the C compiler works" >&5
1415 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1416 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1417 # If not cross compiling, check that we can run a simple program.
1418 if test "$cross_compiling" != yes; then
1419   if { ac_try='./$ac_file'
1420   { (eval echo "$as_me:1420: \"$ac_try\"") >&5
1421   (eval $ac_try) 2>&5
1422   ac_status=$?
1423   echo "$as_me:1423: \$? = $ac_status" >&5
1424   (exit $ac_status); }; }; then
1425     cross_compiling=no
1426   else
1427     if test "$cross_compiling" = maybe; then
1428         cross_compiling=yes
1429     else
1430         { { echo "$as_me:1430: error: cannot run C compiled programs.
1431 If you meant to cross compile, use \`--host'." >&5
1432 echo "$as_me: error: cannot run C compiled programs.
1433 If you meant to cross compile, use \`--host'." >&2;}
1434    { (exit 1); exit 1; }; }
1435     fi
1436   fi
1437 fi
1438 echo "$as_me:1438: result: yes" >&5
1439 echo "${ECHO_T}yes" >&6
1440
1441 rm -f a.out a.exe conftest$ac_cv_exeext
1442 ac_clean_files=$ac_clean_files_save
1443 # Check the compiler produces executables we can run.  If not, either
1444 # the compiler is broken, or we cross compile.
1445 echo "$as_me:1445: checking whether we are cross compiling" >&5
1446 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1447 echo "$as_me:1447: result: $cross_compiling" >&5
1448 echo "${ECHO_T}$cross_compiling" >&6
1449
1450 echo "$as_me:1450: checking for executable suffix" >&5
1451 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1452 if { (eval echo "$as_me:1452: \"$ac_link\"") >&5
1453   (eval $ac_link) 2>&5
1454   ac_status=$?
1455   echo "$as_me:1455: \$? = $ac_status" >&5
1456   (exit $ac_status); }; then
1457   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1458 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1459 # work properly (i.e., refer to `conftest.exe'), while it won't with
1460 # `rm'.
1461 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1462   case $ac_file in
1463     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1464     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1465           export ac_cv_exeext
1466           break;;
1467     * ) break;;
1468   esac
1469 done
1470 else
1471   { { echo "$as_me:1471: error: cannot compute EXEEXT: cannot compile and link" >&5
1472 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1473    { (exit 1); exit 1; }; }
1474 fi
1475
1476 rm -f conftest$ac_cv_exeext
1477 echo "$as_me:1477: result: $ac_cv_exeext" >&5
1478 echo "${ECHO_T}$ac_cv_exeext" >&6
1479
1480 rm -f conftest.$ac_ext
1481 EXEEXT=$ac_cv_exeext
1482 ac_exeext=$EXEEXT
1483 echo "$as_me:1483: checking for object suffix" >&5
1484 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1485 if test "${ac_cv_objext+set}" = set; then
1486   echo $ECHO_N "(cached) $ECHO_C" >&6
1487 else
1488   cat >conftest.$ac_ext <<_ACEOF
1489 #line 1489 "configure"
1490 #include "confdefs.h"
1491
1492 int
1493 main ()
1494 {
1495
1496   ;
1497   return 0;
1498 }
1499 _ACEOF
1500 rm -f conftest.o conftest.obj
1501 if { (eval echo "$as_me:1501: \"$ac_compile\"") >&5
1502   (eval $ac_compile) 2>&5
1503   ac_status=$?
1504   echo "$as_me:1504: \$? = $ac_status" >&5
1505   (exit $ac_status); }; then
1506   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1507   case $ac_file in
1508     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1509     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1510        break;;
1511   esac
1512 done
1513 else
1514   echo "$as_me: failed program was:" >&5
1515 cat conftest.$ac_ext >&5
1516 { { echo "$as_me:1516: error: cannot compute OBJEXT: cannot compile" >&5
1517 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1518    { (exit 1); exit 1; }; }
1519 fi
1520
1521 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1522 fi
1523 echo "$as_me:1523: result: $ac_cv_objext" >&5
1524 echo "${ECHO_T}$ac_cv_objext" >&6
1525 OBJEXT=$ac_cv_objext
1526 ac_objext=$OBJEXT
1527 echo "$as_me:1527: checking whether we are using the GNU C compiler" >&5
1528 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1529 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1530   echo $ECHO_N "(cached) $ECHO_C" >&6
1531 else
1532   cat >conftest.$ac_ext <<_ACEOF
1533 #line 1533 "configure"
1534 #include "confdefs.h"
1535
1536 int
1537 main ()
1538 {
1539 #ifndef __GNUC__
1540        choke me
1541 #endif
1542
1543   ;
1544   return 0;
1545 }
1546 _ACEOF
1547 rm -f conftest.$ac_objext
1548 if { (eval echo "$as_me:1548: \"$ac_compile\"") >&5
1549   (eval $ac_compile) 2>&5
1550   ac_status=$?
1551   echo "$as_me:1551: \$? = $ac_status" >&5
1552   (exit $ac_status); } &&
1553          { ac_try='test -s conftest.$ac_objext'
1554   { (eval echo "$as_me:1554: \"$ac_try\"") >&5
1555   (eval $ac_try) 2>&5
1556   ac_status=$?
1557   echo "$as_me:1557: \$? = $ac_status" >&5
1558   (exit $ac_status); }; }; then
1559   ac_compiler_gnu=yes
1560 else
1561   echo "$as_me: failed program was:" >&5
1562 cat conftest.$ac_ext >&5
1563 ac_compiler_gnu=no
1564 fi
1565 rm -f conftest.$ac_objext conftest.$ac_ext
1566 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1567
1568 fi
1569 echo "$as_me:1569: result: $ac_cv_c_compiler_gnu" >&5
1570 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1571 GCC=`test $ac_compiler_gnu = yes && echo yes`
1572 ac_test_CFLAGS=${CFLAGS+set}
1573 ac_save_CFLAGS=$CFLAGS
1574 CFLAGS="-g"
1575 echo "$as_me:1575: checking whether $CC accepts -g" >&5
1576 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1577 if test "${ac_cv_prog_cc_g+set}" = set; then
1578   echo $ECHO_N "(cached) $ECHO_C" >&6
1579 else
1580   cat >conftest.$ac_ext <<_ACEOF
1581 #line 1581 "configure"
1582 #include "confdefs.h"
1583
1584 int
1585 main ()
1586 {
1587
1588   ;
1589   return 0;
1590 }
1591 _ACEOF
1592 rm -f conftest.$ac_objext
1593 if { (eval echo "$as_me:1593: \"$ac_compile\"") >&5
1594   (eval $ac_compile) 2>&5
1595   ac_status=$?
1596   echo "$as_me:1596: \$? = $ac_status" >&5
1597   (exit $ac_status); } &&
1598          { ac_try='test -s conftest.$ac_objext'
1599   { (eval echo "$as_me:1599: \"$ac_try\"") >&5
1600   (eval $ac_try) 2>&5
1601   ac_status=$?
1602   echo "$as_me:1602: \$? = $ac_status" >&5
1603   (exit $ac_status); }; }; then
1604   ac_cv_prog_cc_g=yes
1605 else
1606   echo "$as_me: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 ac_cv_prog_cc_g=no
1609 fi
1610 rm -f conftest.$ac_objext conftest.$ac_ext
1611 fi
1612 echo "$as_me:1612: result: $ac_cv_prog_cc_g" >&5
1613 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1614 if test "$ac_test_CFLAGS" = set; then
1615   CFLAGS=$ac_save_CFLAGS
1616 elif test $ac_cv_prog_cc_g = yes; then
1617   if test "$GCC" = yes; then
1618     CFLAGS="-g -O2"
1619   else
1620     CFLAGS="-g"
1621   fi
1622 else
1623   if test "$GCC" = yes; then
1624     CFLAGS="-O2"
1625   else
1626     CFLAGS=
1627   fi
1628 fi
1629 # Some people use a C++ compiler to compile C.  Since we use `exit',
1630 # in C++ we need to declare it.  In case someone uses the same compiler
1631 # for both compiling C and C++ we need to have the C++ compiler decide
1632 # the declaration of exit, since it's the most demanding environment.
1633 cat >conftest.$ac_ext <<_ACEOF
1634 #ifndef __cplusplus
1635   choke me
1636 #endif
1637 _ACEOF
1638 rm -f conftest.$ac_objext
1639 if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640   (eval $ac_compile) 2>&5
1641   ac_status=$?
1642   echo "$as_me:1642: \$? = $ac_status" >&5
1643   (exit $ac_status); } &&
1644          { ac_try='test -s conftest.$ac_objext'
1645   { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1646   (eval $ac_try) 2>&5
1647   ac_status=$?
1648   echo "$as_me:1648: \$? = $ac_status" >&5
1649   (exit $ac_status); }; }; then
1650   for ac_declaration in \
1651    ''\
1652    '#include <stdlib.h>' \
1653    'extern "C" void std::exit (int) throw (); using std::exit;' \
1654    'extern "C" void std::exit (int); using std::exit;' \
1655    'extern "C" void exit (int) throw ();' \
1656    'extern "C" void exit (int);' \
1657    'void exit (int);'
1658 do
1659   cat >conftest.$ac_ext <<_ACEOF
1660 #line 1660 "configure"
1661 #include "confdefs.h"
1662 #include <stdlib.h>
1663 $ac_declaration
1664 int
1665 main ()
1666 {
1667 exit (42);
1668   ;
1669   return 0;
1670 }
1671 _ACEOF
1672 rm -f conftest.$ac_objext
1673 if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5
1674   (eval $ac_compile) 2>&5
1675   ac_status=$?
1676   echo "$as_me:1676: \$? = $ac_status" >&5
1677   (exit $ac_status); } &&
1678          { ac_try='test -s conftest.$ac_objext'
1679   { (eval echo "$as_me:1679: \"$ac_try\"") >&5
1680   (eval $ac_try) 2>&5
1681   ac_status=$?
1682   echo "$as_me:1682: \$? = $ac_status" >&5
1683   (exit $ac_status); }; }; then
1684   :
1685 else
1686   echo "$as_me: failed program was:" >&5
1687 cat conftest.$ac_ext >&5
1688 continue
1689 fi
1690 rm -f conftest.$ac_objext conftest.$ac_ext
1691   cat >conftest.$ac_ext <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1694 $ac_declaration
1695 int
1696 main ()
1697 {
1698 exit (42);
1699   ;
1700   return 0;
1701 }
1702 _ACEOF
1703 rm -f conftest.$ac_objext
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705   (eval $ac_compile) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); } &&
1709          { ac_try='test -s conftest.$ac_objext'
1710   { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1711   (eval $ac_try) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }; }; then
1715   break
1716 else
1717   echo "$as_me: failed program was:" >&5
1718 cat conftest.$ac_ext >&5
1719 fi
1720 rm -f conftest.$ac_objext conftest.$ac_ext
1721 done
1722 rm -rf conftest*
1723 if test -n "$ac_declaration"; then
1724   echo '#ifdef __cplusplus' >>confdefs.h
1725   echo $ac_declaration      >>confdefs.h
1726   echo '#endif'             >>confdefs.h
1727 fi
1728
1729 else
1730   echo "$as_me: failed program was:" >&5
1731 cat conftest.$ac_ext >&5
1732 fi
1733 rm -f conftest.$ac_objext conftest.$ac_ext
1734 ac_ext=c
1735 ac_cpp='$CPP $CPPFLAGS'
1736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1739 ac_main_return=return
1740
1741 GCC_VERSION=none
1742 if test "$GCC" = yes ; then
1743         echo "$as_me:1743: checking version of $CC" >&5
1744 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1745         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.].*//'`"
1746         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1747         echo "$as_me:1747: result: $GCC_VERSION" >&5
1748 echo "${ECHO_T}$GCC_VERSION" >&6
1749 fi
1750
1751 echo "$as_me:1751: checking for $CC option to accept ANSI C" >&5
1752 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1753 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1754   echo $ECHO_N "(cached) $ECHO_C" >&6
1755 else
1756   ac_cv_prog_cc_stdc=no
1757 ac_save_CC=$CC
1758 cat >conftest.$ac_ext <<_ACEOF
1759 #line 1759 "configure"
1760 #include "confdefs.h"
1761 #include <stdarg.h>
1762 #include <stdio.h>
1763 #include <sys/types.h>
1764 #include <sys/stat.h>
1765 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1766 struct buf { int x; };
1767 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1768 static char *e (p, i)
1769      char **p;
1770      int i;
1771 {
1772   return p[i];
1773 }
1774 static char *f (char * (*g) (char **, int), char **p, ...)
1775 {
1776   char *s;
1777   va_list v;
1778   va_start (v,p);
1779   s = g (p, va_arg (v,int));
1780   va_end (v);
1781   return s;
1782 }
1783 int test (int i, double x);
1784 struct s1 {int (*f) (int a);};
1785 struct s2 {int (*f) (double a);};
1786 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1787 int argc;
1788 char **argv;
1789 int
1790 main ()
1791 {
1792 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1793   ;
1794   return 0;
1795 }
1796 _ACEOF
1797 # Don't try gcc -ansi; that turns off useful extensions and
1798 # breaks some systems' header files.
1799 # AIX                   -qlanglvl=ansi
1800 # Ultrix and OSF/1      -std1
1801 # HP-UX 10.20 and later -Ae
1802 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1803 # SVR4                  -Xc -D__EXTENSIONS__
1804 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1805 do
1806   CC="$ac_save_CC $ac_arg"
1807   rm -f conftest.$ac_objext
1808 if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
1809   (eval $ac_compile) 2>&5
1810   ac_status=$?
1811   echo "$as_me:1811: \$? = $ac_status" >&5
1812   (exit $ac_status); } &&
1813          { ac_try='test -s conftest.$ac_objext'
1814   { (eval echo "$as_me:1814: \"$ac_try\"") >&5
1815   (eval $ac_try) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; }; then
1819   ac_cv_prog_cc_stdc=$ac_arg
1820 break
1821 else
1822   echo "$as_me: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1824 fi
1825 rm -f conftest.$ac_objext
1826 done
1827 rm -f conftest.$ac_ext conftest.$ac_objext
1828 CC=$ac_save_CC
1829
1830 fi
1831
1832 case "x$ac_cv_prog_cc_stdc" in
1833   x|xno)
1834     echo "$as_me:1834: result: none needed" >&5
1835 echo "${ECHO_T}none needed" >&6 ;;
1836   *)
1837     echo "$as_me:1837: result: $ac_cv_prog_cc_stdc" >&5
1838 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1839     CC="$CC $ac_cv_prog_cc_stdc" ;;
1840 esac
1841
1842 # This should have been defined by AC_PROG_CC
1843 : ${CC:=cc}
1844
1845 echo "$as_me:1845: checking \$CC variable" >&5
1846 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1847 case "$CC" in #(vi
1848 *[\ \   ]-[IUD]*)
1849         echo "$as_me:1849: result: broken" >&5
1850 echo "${ECHO_T}broken" >&6
1851         { echo "$as_me:1851: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1852 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1853         # humor him...
1854         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
1855         CC=`echo "$CC" | sed -e 's/[    ].*//'`
1856
1857 cf_fix_cppflags=no
1858 cf_new_cflags=
1859 cf_new_cppflags=
1860 cf_new_extra_cppflags=
1861
1862 for cf_add_cflags in $cf_flags
1863 do
1864 case $cf_fix_cppflags in
1865 no)
1866         case $cf_add_cflags in #(vi
1867         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1868                 case $cf_add_cflags in
1869                 -D*)
1870                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1871
1872                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1873                                 && test -z "${cf_tst_cflags}" \
1874                                 && cf_fix_cppflags=yes
1875
1876                         if test $cf_fix_cppflags = yes ; then
1877                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1878                                 continue
1879                         elif test "${cf_tst_cflags}" = "\"'" ; then
1880                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1881                                 continue
1882                         fi
1883                         ;;
1884                 esac
1885                 case "$CPPFLAGS" in
1886                 *$cf_add_cflags) #(vi
1887                         ;;
1888                 *) #(vi
1889                         case $cf_add_cflags in #(vi
1890                         -D*)
1891                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1892
1893 CPPFLAGS=`echo "$CPPFLAGS" | \
1894         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1895                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1896
1897                                 ;;
1898                         esac
1899                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1900                         ;;
1901                 esac
1902                 ;;
1903         *)
1904                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1905                 ;;
1906         esac
1907         ;;
1908 yes)
1909         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1910
1911         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1912
1913         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1914                 && test -z "${cf_tst_cflags}" \
1915                 && cf_fix_cppflags=no
1916         ;;
1917 esac
1918 done
1919
1920 if test -n "$cf_new_cflags" ; then
1921
1922         CFLAGS="$CFLAGS $cf_new_cflags"
1923 fi
1924
1925 if test -n "$cf_new_cppflags" ; then
1926
1927         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1928 fi
1929
1930 if test -n "$cf_new_extra_cppflags" ; then
1931
1932         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1933 fi
1934
1935         ;;
1936 *)
1937         echo "$as_me:1937: result: ok" >&5
1938 echo "${ECHO_T}ok" >&6
1939         ;;
1940 esac
1941
1942 ac_ext=c
1943 ac_cpp='$CPP $CPPFLAGS'
1944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1947 ac_main_return=return
1948 echo "$as_me:1948: checking how to run the C preprocessor" >&5
1949 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1950 # On Suns, sometimes $CPP names a directory.
1951 if test -n "$CPP" && test -d "$CPP"; then
1952   CPP=
1953 fi
1954 if test -z "$CPP"; then
1955   if test "${ac_cv_prog_CPP+set}" = set; then
1956   echo $ECHO_N "(cached) $ECHO_C" >&6
1957 else
1958       # Double quotes because CPP needs to be expanded
1959     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1960     do
1961       ac_preproc_ok=false
1962 for ac_c_preproc_warn_flag in '' yes
1963 do
1964   # Use a header file that comes with gcc, so configuring glibc
1965   # with a fresh cross-compiler works.
1966   # On the NeXT, cc -E runs the code through the compiler's parser,
1967   # not just through cpp. "Syntax error" is here to catch this case.
1968   cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1971 #include <assert.h>
1972                      Syntax error
1973 _ACEOF
1974 if { (eval echo "$as_me:1974: \"$ac_cpp conftest.$ac_ext\"") >&5
1975   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1976   ac_status=$?
1977   egrep -v '^ *\+' conftest.er1 >conftest.err
1978   rm -f conftest.er1
1979   cat conftest.err >&5
1980   echo "$as_me:1980: \$? = $ac_status" >&5
1981   (exit $ac_status); } >/dev/null; then
1982   if test -s conftest.err; then
1983     ac_cpp_err=$ac_c_preproc_warn_flag
1984   else
1985     ac_cpp_err=
1986   fi
1987 else
1988   ac_cpp_err=yes
1989 fi
1990 if test -z "$ac_cpp_err"; then
1991   :
1992 else
1993   echo "$as_me: failed program was:" >&5
1994   cat conftest.$ac_ext >&5
1995   # Broken: fails on valid input.
1996 continue
1997 fi
1998 rm -f conftest.err conftest.$ac_ext
1999
2000   # OK, works on sane cases.  Now check whether non-existent headers
2001   # can be detected and how.
2002   cat >conftest.$ac_ext <<_ACEOF
2003 #line 2003 "configure"
2004 #include "confdefs.h"
2005 #include <ac_nonexistent.h>
2006 _ACEOF
2007 if { (eval echo "$as_me:2007: \"$ac_cpp conftest.$ac_ext\"") >&5
2008   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2009   ac_status=$?
2010   egrep -v '^ *\+' conftest.er1 >conftest.err
2011   rm -f conftest.er1
2012   cat conftest.err >&5
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } >/dev/null; then
2015   if test -s conftest.err; then
2016     ac_cpp_err=$ac_c_preproc_warn_flag
2017   else
2018     ac_cpp_err=
2019   fi
2020 else
2021   ac_cpp_err=yes
2022 fi
2023 if test -z "$ac_cpp_err"; then
2024   # Broken: success on invalid input.
2025 continue
2026 else
2027   echo "$as_me: failed program was:" >&5
2028   cat conftest.$ac_ext >&5
2029   # Passes both tests.
2030 ac_preproc_ok=:
2031 break
2032 fi
2033 rm -f conftest.err conftest.$ac_ext
2034
2035 done
2036 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2037 rm -f conftest.err conftest.$ac_ext
2038 if $ac_preproc_ok; then
2039   break
2040 fi
2041
2042     done
2043     ac_cv_prog_CPP=$CPP
2044
2045 fi
2046   CPP=$ac_cv_prog_CPP
2047 else
2048   ac_cv_prog_CPP=$CPP
2049 fi
2050 echo "$as_me:2050: result: $CPP" >&5
2051 echo "${ECHO_T}$CPP" >&6
2052 ac_preproc_ok=false
2053 for ac_c_preproc_warn_flag in '' yes
2054 do
2055   # Use a header file that comes with gcc, so configuring glibc
2056   # with a fresh cross-compiler works.
2057   # On the NeXT, cc -E runs the code through the compiler's parser,
2058   # not just through cpp. "Syntax error" is here to catch this case.
2059   cat >conftest.$ac_ext <<_ACEOF
2060 #line 2060 "configure"
2061 #include "confdefs.h"
2062 #include <assert.h>
2063                      Syntax error
2064 _ACEOF
2065 if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
2066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2067   ac_status=$?
2068   egrep -v '^ *\+' conftest.er1 >conftest.err
2069   rm -f conftest.er1
2070   cat conftest.err >&5
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); } >/dev/null; then
2073   if test -s conftest.err; then
2074     ac_cpp_err=$ac_c_preproc_warn_flag
2075   else
2076     ac_cpp_err=
2077   fi
2078 else
2079   ac_cpp_err=yes
2080 fi
2081 if test -z "$ac_cpp_err"; then
2082   :
2083 else
2084   echo "$as_me: failed program was:" >&5
2085   cat conftest.$ac_ext >&5
2086   # Broken: fails on valid input.
2087 continue
2088 fi
2089 rm -f conftest.err conftest.$ac_ext
2090
2091   # OK, works on sane cases.  Now check whether non-existent headers
2092   # can be detected and how.
2093   cat >conftest.$ac_ext <<_ACEOF
2094 #line 2094 "configure"
2095 #include "confdefs.h"
2096 #include <ac_nonexistent.h>
2097 _ACEOF
2098 if { (eval echo "$as_me:2098: \"$ac_cpp conftest.$ac_ext\"") >&5
2099   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2100   ac_status=$?
2101   egrep -v '^ *\+' conftest.er1 >conftest.err
2102   rm -f conftest.er1
2103   cat conftest.err >&5
2104   echo "$as_me:2104: \$? = $ac_status" >&5
2105   (exit $ac_status); } >/dev/null; then
2106   if test -s conftest.err; then
2107     ac_cpp_err=$ac_c_preproc_warn_flag
2108   else
2109     ac_cpp_err=
2110   fi
2111 else
2112   ac_cpp_err=yes
2113 fi
2114 if test -z "$ac_cpp_err"; then
2115   # Broken: success on invalid input.
2116 continue
2117 else
2118   echo "$as_me: failed program was:" >&5
2119   cat conftest.$ac_ext >&5
2120   # Passes both tests.
2121 ac_preproc_ok=:
2122 break
2123 fi
2124 rm -f conftest.err conftest.$ac_ext
2125
2126 done
2127 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2128 rm -f conftest.err conftest.$ac_ext
2129 if $ac_preproc_ok; then
2130   :
2131 else
2132   { { echo "$as_me:2132: error: C preprocessor \"$CPP\" fails sanity check" >&5
2133 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2134    { (exit 1); exit 1; }; }
2135 fi
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143
2144 echo "$as_me:2144: checking whether ${MAKE-make} sets \${MAKE}" >&5
2145 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2146 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2147 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2148   echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150   cat >conftest.make <<\EOF
2151 all:
2152         @echo 'ac_maketemp="${MAKE}"'
2153 EOF
2154 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2155 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2156 if test -n "$ac_maketemp"; then
2157   eval ac_cv_prog_make_${ac_make}_set=yes
2158 else
2159   eval ac_cv_prog_make_${ac_make}_set=no
2160 fi
2161 rm -f conftest.make
2162 fi
2163 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2164   echo "$as_me:2164: result: yes" >&5
2165 echo "${ECHO_T}yes" >&6
2166   SET_MAKE=
2167 else
2168   echo "$as_me:2168: result: no" >&5
2169 echo "${ECHO_T}no" >&6
2170   SET_MAKE="MAKE=${MAKE-make}"
2171 fi
2172
2173 if test -n "$ac_tool_prefix"; then
2174   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2175 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2176 echo "$as_me:2176: checking for $ac_word" >&5
2177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2178 if test "${ac_cv_prog_RANLIB+set}" = set; then
2179   echo $ECHO_N "(cached) $ECHO_C" >&6
2180 else
2181   if test -n "$RANLIB"; then
2182   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2183 else
2184   ac_save_IFS=$IFS; IFS=$ac_path_separator
2185 ac_dummy="$PATH"
2186 for ac_dir in $ac_dummy; do
2187   IFS=$ac_save_IFS
2188   test -z "$ac_dir" && ac_dir=.
2189   $as_executable_p "$ac_dir/$ac_word" || continue
2190 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2191 echo "$as_me:2191: found $ac_dir/$ac_word" >&5
2192 break
2193 done
2194
2195 fi
2196 fi
2197 RANLIB=$ac_cv_prog_RANLIB
2198 if test -n "$RANLIB"; then
2199   echo "$as_me:2199: result: $RANLIB" >&5
2200 echo "${ECHO_T}$RANLIB" >&6
2201 else
2202   echo "$as_me:2202: result: no" >&5
2203 echo "${ECHO_T}no" >&6
2204 fi
2205
2206 fi
2207 if test -z "$ac_cv_prog_RANLIB"; then
2208   ac_ct_RANLIB=$RANLIB
2209   # Extract the first word of "ranlib", so it can be a program name with args.
2210 set dummy ranlib; ac_word=$2
2211 echo "$as_me:2211: checking for $ac_word" >&5
2212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2214   echo $ECHO_N "(cached) $ECHO_C" >&6
2215 else
2216   if test -n "$ac_ct_RANLIB"; then
2217   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2218 else
2219   ac_save_IFS=$IFS; IFS=$ac_path_separator
2220 ac_dummy="$PATH"
2221 for ac_dir in $ac_dummy; do
2222   IFS=$ac_save_IFS
2223   test -z "$ac_dir" && ac_dir=.
2224   $as_executable_p "$ac_dir/$ac_word" || continue
2225 ac_cv_prog_ac_ct_RANLIB="ranlib"
2226 echo "$as_me:2226: found $ac_dir/$ac_word" >&5
2227 break
2228 done
2229
2230   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2231 fi
2232 fi
2233 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2234 if test -n "$ac_ct_RANLIB"; then
2235   echo "$as_me:2235: result: $ac_ct_RANLIB" >&5
2236 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2237 else
2238   echo "$as_me:2238: result: no" >&5
2239 echo "${ECHO_T}no" >&6
2240 fi
2241
2242   RANLIB=$ac_ct_RANLIB
2243 else
2244   RANLIB="$ac_cv_prog_RANLIB"
2245 fi
2246
2247 ac_aux_dir=
2248 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2249   if test -f $ac_dir/install-sh; then
2250     ac_aux_dir=$ac_dir
2251     ac_install_sh="$ac_aux_dir/install-sh -c"
2252     break
2253   elif test -f $ac_dir/install.sh; then
2254     ac_aux_dir=$ac_dir
2255     ac_install_sh="$ac_aux_dir/install.sh -c"
2256     break
2257   elif test -f $ac_dir/shtool; then
2258     ac_aux_dir=$ac_dir
2259     ac_install_sh="$ac_aux_dir/shtool install -c"
2260     break
2261   fi
2262 done
2263 if test -z "$ac_aux_dir"; then
2264   { { echo "$as_me:2264: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2265 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2266    { (exit 1); exit 1; }; }
2267 fi
2268 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2269 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2270 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2271
2272 # Find a good install program.  We prefer a C program (faster),
2273 # so one script is as good as another.  But avoid the broken or
2274 # incompatible versions:
2275 # SysV /etc/install, /usr/sbin/install
2276 # SunOS /usr/etc/install
2277 # IRIX /sbin/install
2278 # AIX /bin/install
2279 # AmigaOS /C/install, which installs bootblocks on floppy discs
2280 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2281 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2282 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2283 # ./install, which can be erroneously created by make from ./install.sh.
2284 echo "$as_me:2284: checking for a BSD compatible install" >&5
2285 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2286 if test -z "$INSTALL"; then
2287 if test "${ac_cv_path_install+set}" = set; then
2288   echo $ECHO_N "(cached) $ECHO_C" >&6
2289 else
2290     ac_save_IFS=$IFS; IFS=$ac_path_separator
2291   for ac_dir in $PATH; do
2292     IFS=$ac_save_IFS
2293     # Account for people who put trailing slashes in PATH elements.
2294     case $ac_dir/ in
2295     / | ./ | .// | /cC/* \
2296     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2297     | /usr/ucb/* ) ;;
2298     *)
2299       # OSF1 and SCO ODT 3.0 have their own names for install.
2300       # Don't use installbsd from OSF since it installs stuff as root
2301       # by default.
2302       for ac_prog in ginstall scoinst install; do
2303         if $as_executable_p "$ac_dir/$ac_prog"; then
2304           if test $ac_prog = install &&
2305             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2306             # AIX install.  It has an incompatible calling convention.
2307             :
2308           elif test $ac_prog = install &&
2309             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2310             # program-specific install script used by HP pwplus--don't use.
2311             :
2312           else
2313             ac_cv_path_install="$ac_dir/$ac_prog -c"
2314             break 2
2315           fi
2316         fi
2317       done
2318       ;;
2319     esac
2320   done
2321
2322 fi
2323   if test "${ac_cv_path_install+set}" = set; then
2324     INSTALL=$ac_cv_path_install
2325   else
2326     # As a last resort, use the slow shell script.  We don't cache a
2327     # path for INSTALL within a source directory, because that will
2328     # break other packages using the cache if that directory is
2329     # removed, or if the path is relative.
2330     INSTALL=$ac_install_sh
2331   fi
2332 fi
2333 echo "$as_me:2333: result: $INSTALL" >&5
2334 echo "${ECHO_T}$INSTALL" >&6
2335
2336 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2337 # It thinks the first close brace ends the variable substitution.
2338 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2339
2340 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2341
2342 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2343
2344 echo "$as_me:2344: checking whether ln -s works" >&5
2345 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2346 LN_S=$as_ln_s
2347 if test "$LN_S" = "ln -s"; then
2348   echo "$as_me:2348: result: yes" >&5
2349 echo "${ECHO_T}yes" >&6
2350 else
2351   echo "$as_me:2351: result: no, using $LN_S" >&5
2352 echo "${ECHO_T}no, using $LN_S" >&6
2353 fi
2354
2355 echo "$as_me:2355: checking if $LN_S -f options work" >&5
2356 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2357
2358 rm -f conf$$.src conf$$dst
2359 echo >conf$$.dst
2360 echo first >conf$$.src
2361 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2362         cf_prog_ln_sf=yes
2363 else
2364         cf_prog_ln_sf=no
2365 fi
2366 rm -f conf$$.dst conf$$src
2367 echo "$as_me:2367: result: $cf_prog_ln_sf" >&5
2368 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2369
2370 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2371
2372 for ac_prog in tdlint lint alint splint lclint
2373 do
2374   # Extract the first word of "$ac_prog", so it can be a program name with args.
2375 set dummy $ac_prog; ac_word=$2
2376 echo "$as_me:2376: checking for $ac_word" >&5
2377 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2378 if test "${ac_cv_prog_LINT+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381   if test -n "$LINT"; then
2382   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2383 else
2384   ac_save_IFS=$IFS; IFS=$ac_path_separator
2385 ac_dummy="$PATH"
2386 for ac_dir in $ac_dummy; do
2387   IFS=$ac_save_IFS
2388   test -z "$ac_dir" && ac_dir=.
2389   $as_executable_p "$ac_dir/$ac_word" || continue
2390 ac_cv_prog_LINT="$ac_prog"
2391 echo "$as_me:2391: found $ac_dir/$ac_word" >&5
2392 break
2393 done
2394
2395 fi
2396 fi
2397 LINT=$ac_cv_prog_LINT
2398 if test -n "$LINT"; then
2399   echo "$as_me:2399: result: $LINT" >&5
2400 echo "${ECHO_T}$LINT" >&6
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404 fi
2405
2406   test -n "$LINT" && break
2407 done
2408
2409 if test -n "$ac_tool_prefix"; then
2410   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2411 set dummy ${ac_tool_prefix}ar; ac_word=$2
2412 echo "$as_me:2412: checking for $ac_word" >&5
2413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2414 if test "${ac_cv_prog_AR+set}" = set; then
2415   echo $ECHO_N "(cached) $ECHO_C" >&6
2416 else
2417   if test -n "$AR"; then
2418   ac_cv_prog_AR="$AR" # Let the user override the test.
2419 else
2420   ac_save_IFS=$IFS; IFS=$ac_path_separator
2421 ac_dummy="$PATH"
2422 for ac_dir in $ac_dummy; do
2423   IFS=$ac_save_IFS
2424   test -z "$ac_dir" && ac_dir=.
2425   $as_executable_p "$ac_dir/$ac_word" || continue
2426 ac_cv_prog_AR="${ac_tool_prefix}ar"
2427 echo "$as_me:2427: found $ac_dir/$ac_word" >&5
2428 break
2429 done
2430
2431 fi
2432 fi
2433 AR=$ac_cv_prog_AR
2434 if test -n "$AR"; then
2435   echo "$as_me:2435: result: $AR" >&5
2436 echo "${ECHO_T}$AR" >&6
2437 else
2438   echo "$as_me:2438: result: no" >&5
2439 echo "${ECHO_T}no" >&6
2440 fi
2441
2442 fi
2443 if test -z "$ac_cv_prog_AR"; then
2444   ac_ct_AR=$AR
2445   # Extract the first word of "ar", so it can be a program name with args.
2446 set dummy ar; ac_word=$2
2447 echo "$as_me:2447: checking for $ac_word" >&5
2448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2449 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2450   echo $ECHO_N "(cached) $ECHO_C" >&6
2451 else
2452   if test -n "$ac_ct_AR"; then
2453   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2454 else
2455   ac_save_IFS=$IFS; IFS=$ac_path_separator
2456 ac_dummy="$PATH"
2457 for ac_dir in $ac_dummy; do
2458   IFS=$ac_save_IFS
2459   test -z "$ac_dir" && ac_dir=.
2460   $as_executable_p "$ac_dir/$ac_word" || continue
2461 ac_cv_prog_ac_ct_AR="ar"
2462 echo "$as_me:2462: found $ac_dir/$ac_word" >&5
2463 break
2464 done
2465
2466   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2467 fi
2468 fi
2469 ac_ct_AR=$ac_cv_prog_ac_ct_AR
2470 if test -n "$ac_ct_AR"; then
2471   echo "$as_me:2471: result: $ac_ct_AR" >&5
2472 echo "${ECHO_T}$ac_ct_AR" >&6
2473 else
2474   echo "$as_me:2474: result: no" >&5
2475 echo "${ECHO_T}no" >&6
2476 fi
2477
2478   AR=$ac_ct_AR
2479 else
2480   AR="$ac_cv_prog_AR"
2481 fi
2482
2483 echo "$as_me:2483: checking for makeflags variable" >&5
2484 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2485 if test "${cf_cv_makeflags+set}" = set; then
2486   echo $ECHO_N "(cached) $ECHO_C" >&6
2487 else
2488
2489         cf_cv_makeflags=''
2490         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2491         do
2492                 cat >cf_makeflags.tmp <<CF_EOF
2493 SHELL = /bin/sh
2494 all :
2495         @ echo '.$cf_option'
2496 CF_EOF
2497                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
2498                 case "$cf_result" in
2499                 .*k)
2500                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2501                         case "$cf_result" in
2502                         .*CC=*) cf_cv_makeflags=
2503                                 ;;
2504                         *)      cf_cv_makeflags=$cf_option
2505                                 ;;
2506                         esac
2507                         break
2508                         ;;
2509                 .-)     ;;
2510                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
2511                         ;;
2512                 esac
2513         done
2514         rm -f cf_makeflags.tmp
2515
2516 fi
2517 echo "$as_me:2517: result: $cf_cv_makeflags" >&5
2518 echo "${ECHO_T}$cf_cv_makeflags" >&6
2519
2520 echo "$as_me:2520: checking if filesystem supports mixed-case filenames" >&5
2521 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2522 if test "${cf_cv_mixedcase+set}" = set; then
2523   echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525
2526 if test "$cross_compiling" = yes ; then
2527         case $target_alias in #(vi
2528         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi
2529                 cf_cv_mixedcase=no
2530                 ;;
2531         *)
2532                 cf_cv_mixedcase=yes
2533                 ;;
2534         esac
2535 else
2536         rm -f conftest CONFTEST
2537         echo test >conftest
2538         if test -f CONFTEST ; then
2539                 cf_cv_mixedcase=no
2540         else
2541                 cf_cv_mixedcase=yes
2542         fi
2543         rm -f conftest CONFTEST
2544 fi
2545
2546 fi
2547 echo "$as_me:2547: result: $cf_cv_mixedcase" >&5
2548 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2549 test "$cf_cv_mixedcase" = yes &&
2550 cat >>confdefs.h <<\EOF
2551 #define MIXEDCASE_FILENAMES 1
2552 EOF
2553
2554 for ac_prog in exctags ctags
2555 do
2556   # Extract the first word of "$ac_prog", so it can be a program name with args.
2557 set dummy $ac_prog; ac_word=$2
2558 echo "$as_me:2558: checking for $ac_word" >&5
2559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2560 if test "${ac_cv_prog_CTAGS+set}" = set; then
2561   echo $ECHO_N "(cached) $ECHO_C" >&6
2562 else
2563   if test -n "$CTAGS"; then
2564   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2565 else
2566   ac_save_IFS=$IFS; IFS=$ac_path_separator
2567 ac_dummy="$PATH"
2568 for ac_dir in $ac_dummy; do
2569   IFS=$ac_save_IFS
2570   test -z "$ac_dir" && ac_dir=.
2571   $as_executable_p "$ac_dir/$ac_word" || continue
2572 ac_cv_prog_CTAGS="$ac_prog"
2573 echo "$as_me:2573: found $ac_dir/$ac_word" >&5
2574 break
2575 done
2576
2577 fi
2578 fi
2579 CTAGS=$ac_cv_prog_CTAGS
2580 if test -n "$CTAGS"; then
2581   echo "$as_me:2581: result: $CTAGS" >&5
2582 echo "${ECHO_T}$CTAGS" >&6
2583 else
2584   echo "$as_me:2584: result: no" >&5
2585 echo "${ECHO_T}no" >&6
2586 fi
2587
2588   test -n "$CTAGS" && break
2589 done
2590
2591 for ac_prog in exetags etags
2592 do
2593   # Extract the first word of "$ac_prog", so it can be a program name with args.
2594 set dummy $ac_prog; ac_word=$2
2595 echo "$as_me:2595: checking for $ac_word" >&5
2596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2597 if test "${ac_cv_prog_ETAGS+set}" = set; then
2598   echo $ECHO_N "(cached) $ECHO_C" >&6
2599 else
2600   if test -n "$ETAGS"; then
2601   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2602 else
2603   ac_save_IFS=$IFS; IFS=$ac_path_separator
2604 ac_dummy="$PATH"
2605 for ac_dir in $ac_dummy; do
2606   IFS=$ac_save_IFS
2607   test -z "$ac_dir" && ac_dir=.
2608   $as_executable_p "$ac_dir/$ac_word" || continue
2609 ac_cv_prog_ETAGS="$ac_prog"
2610 echo "$as_me:2610: found $ac_dir/$ac_word" >&5
2611 break
2612 done
2613
2614 fi
2615 fi
2616 ETAGS=$ac_cv_prog_ETAGS
2617 if test -n "$ETAGS"; then
2618   echo "$as_me:2618: result: $ETAGS" >&5
2619 echo "${ECHO_T}$ETAGS" >&6
2620 else
2621   echo "$as_me:2621: result: no" >&5
2622 echo "${ECHO_T}no" >&6
2623 fi
2624
2625   test -n "$ETAGS" && break
2626 done
2627
2628 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2629 set dummy ${CTAGS:-ctags}; ac_word=$2
2630 echo "$as_me:2630: checking for $ac_word" >&5
2631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2632 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2633   echo $ECHO_N "(cached) $ECHO_C" >&6
2634 else
2635   if test -n "$MAKE_LOWER_TAGS"; then
2636   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2637 else
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$PATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   $as_executable_p "$ac_dir/$ac_word" || continue
2644 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2645 echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646 break
2647 done
2648
2649   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2650 fi
2651 fi
2652 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2653 if test -n "$MAKE_LOWER_TAGS"; then
2654   echo "$as_me:2654: result: $MAKE_LOWER_TAGS" >&5
2655 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2656 else
2657   echo "$as_me:2657: result: no" >&5
2658 echo "${ECHO_T}no" >&6
2659 fi
2660
2661 if test "$cf_cv_mixedcase" = yes ; then
2662         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2663 set dummy ${ETAGS:-etags}; ac_word=$2
2664 echo "$as_me:2664: checking for $ac_word" >&5
2665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2666 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   if test -n "$MAKE_UPPER_TAGS"; then
2670   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2671 else
2672   ac_save_IFS=$IFS; IFS=$ac_path_separator
2673 ac_dummy="$PATH"
2674 for ac_dir in $ac_dummy; do
2675   IFS=$ac_save_IFS
2676   test -z "$ac_dir" && ac_dir=.
2677   $as_executable_p "$ac_dir/$ac_word" || continue
2678 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2679 echo "$as_me:2679: found $ac_dir/$ac_word" >&5
2680 break
2681 done
2682
2683   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2684 fi
2685 fi
2686 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2687 if test -n "$MAKE_UPPER_TAGS"; then
2688   echo "$as_me:2688: result: $MAKE_UPPER_TAGS" >&5
2689 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2690 else
2691   echo "$as_me:2691: result: no" >&5
2692 echo "${ECHO_T}no" >&6
2693 fi
2694
2695 else
2696         MAKE_UPPER_TAGS=no
2697 fi
2698
2699 if test "$MAKE_UPPER_TAGS" = yes ; then
2700         MAKE_UPPER_TAGS=
2701 else
2702         MAKE_UPPER_TAGS="#"
2703 fi
2704
2705 if test "$MAKE_LOWER_TAGS" = yes ; then
2706         MAKE_LOWER_TAGS=
2707 else
2708         MAKE_LOWER_TAGS="#"
2709 fi
2710
2711 echo "$as_me:2711: checking if you want to see long compiling messages" >&5
2712 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2713
2714 # Check whether --enable-echo or --disable-echo was given.
2715 if test "${enable_echo+set}" = set; then
2716   enableval="$enable_echo"
2717   test "$enableval" != no && enableval=yes
2718   if test "$enableval" != "yes" ; then
2719
2720     ECHO_LT='--silent'
2721     ECHO_LD='@echo linking $@;'
2722     RULE_CC='@echo compiling $<'
2723     SHOW_CC='@echo compiling $@'
2724     ECHO_CC='@'
2725
2726   else
2727
2728     ECHO_LT=''
2729     ECHO_LD=''
2730     RULE_CC=''
2731     SHOW_CC=''
2732     ECHO_CC=''
2733
2734   fi
2735 else
2736   enableval=yes
2737
2738     ECHO_LT=''
2739     ECHO_LD=''
2740     RULE_CC=''
2741     SHOW_CC=''
2742     ECHO_CC=''
2743
2744 fi;
2745 echo "$as_me:2745: result: $enableval" >&5
2746 echo "${ECHO_T}$enableval" >&6
2747
2748 # Make sure we can run config.sub.
2749 $ac_config_sub sun4 >/dev/null 2>&1 ||
2750   { { echo "$as_me:2750: error: cannot run $ac_config_sub" >&5
2751 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2752    { (exit 1); exit 1; }; }
2753
2754 echo "$as_me:2754: checking build system type" >&5
2755 echo $ECHO_N "checking build system type... $ECHO_C" >&6
2756 if test "${ac_cv_build+set}" = set; then
2757   echo $ECHO_N "(cached) $ECHO_C" >&6
2758 else
2759   ac_cv_build_alias=$build_alias
2760 test -z "$ac_cv_build_alias" &&
2761   ac_cv_build_alias=`$ac_config_guess`
2762 test -z "$ac_cv_build_alias" &&
2763   { { echo "$as_me:2763: error: cannot guess build type; you must specify one" >&5
2764 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2765    { (exit 1); exit 1; }; }
2766 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2767   { { echo "$as_me:2767: error: $ac_config_sub $ac_cv_build_alias failed." >&5
2768 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
2769    { (exit 1); exit 1; }; }
2770
2771 fi
2772 echo "$as_me:2772: result: $ac_cv_build" >&5
2773 echo "${ECHO_T}$ac_cv_build" >&6
2774 build=$ac_cv_build
2775 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2776 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2777 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2778
2779 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
2780         echo "$as_me:2780: checking host system type" >&5
2781 echo $ECHO_N "checking host system type... $ECHO_C" >&6
2782 if test "${ac_cv_host+set}" = set; then
2783   echo $ECHO_N "(cached) $ECHO_C" >&6
2784 else
2785   ac_cv_host_alias=$host_alias
2786 test -z "$ac_cv_host_alias" &&
2787   ac_cv_host_alias=$ac_cv_build_alias
2788 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2789   { { echo "$as_me:2789: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2790 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2791    { (exit 1); exit 1; }; }
2792
2793 fi
2794 echo "$as_me:2794: result: $ac_cv_host" >&5
2795 echo "${ECHO_T}$ac_cv_host" >&6
2796 host=$ac_cv_host
2797 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2798 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2799 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2800
2801         system_name="$host_os"
2802 else
2803         system_name="`(uname -s -r) 2>/dev/null`"
2804         if test -z "$system_name" ; then
2805                 system_name="`(hostname) 2>/dev/null`"
2806         fi
2807 fi
2808 test -n "$system_name" &&
2809 cat >>confdefs.h <<EOF
2810 #define SYSTEM_NAME "$system_name"
2811 EOF
2812
2813 if test "${cf_cv_system_name+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   cf_cv_system_name="$system_name"
2817 fi
2818
2819 test -z "$system_name" && system_name="$cf_cv_system_name"
2820 test -n "$cf_cv_system_name" && echo "$as_me:2820: result: Configuring for $cf_cv_system_name" >&5
2821 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
2822
2823 if test ".$system_name" != ".$cf_cv_system_name" ; then
2824         echo "$as_me:2824: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
2825 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
2826         { { echo "$as_me:2826: error: \"Please remove config.cache and try again.\"" >&5
2827 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
2828    { (exit 1); exit 1; }; }
2829 fi
2830
2831 case $cf_cv_system_name in
2832 os2*)
2833     CFLAGS="$CFLAGS -Zmt"
2834     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2835     CXXFLAGS="$CXXFLAGS -Zmt"
2836     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2837     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2838     ac_cv_exeext=.exe
2839     ;;
2840 esac
2841
2842 PROG_EXT="$EXEEXT"
2843
2844 test -n "$PROG_EXT" &&
2845 cat >>confdefs.h <<EOF
2846 #define PROG_EXT "$PROG_EXT"
2847 EOF
2848
2849         echo "$as_me:2849: checking for PATH separator" >&5
2850 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
2851         case $cf_cv_system_name in
2852         os2*)   PATH_SEPARATOR=';'  ;;
2853         *)      ${PATH_SEPARATOR:=':'}  ;;
2854         esac
2855
2856         echo "$as_me:2856: result: $PATH_SEPARATOR" >&5
2857 echo "${ECHO_T}$PATH_SEPARATOR" >&6
2858
2859         case $cf_cv_system_name in #(vi
2860         OS/2*|os2*) #(vi
2861         LIB_PREFIX=''
2862         ;;
2863         *)      LIB_PREFIX='lib'
2864         ;;
2865         esac
2866
2867 cf_XOPEN_SOURCE=500
2868 cf_POSIX_C_SOURCE=199506L
2869 cf_xopen_source=
2870
2871 case $host_os in #(vi
2872 aix[4-7]*) #(vi
2873         cf_xopen_source="-D_ALL_SOURCE"
2874         ;;
2875 cygwin|msys) #(vi
2876         cf_XOPEN_SOURCE=600
2877         ;;
2878 darwin[0-8].*) #(vi
2879         cf_xopen_source="-D_APPLE_C_SOURCE"
2880         ;;
2881 darwin*) #(vi
2882         cf_xopen_source="-D_DARWIN_C_SOURCE"
2883         cf_XOPEN_SOURCE=
2884         ;;
2885 freebsd*|dragonfly*) #(vi
2886         # 5.x headers associate
2887         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2888         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2889         cf_POSIX_C_SOURCE=200112L
2890         cf_XOPEN_SOURCE=600
2891         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2892         ;;
2893 hpux11*) #(vi
2894         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2895         ;;
2896 hpux*) #(vi
2897         cf_xopen_source="-D_HPUX_SOURCE"
2898         ;;
2899 irix[56].*) #(vi
2900         cf_xopen_source="-D_SGI_SOURCE"
2901         cf_XOPEN_SOURCE=
2902         ;;
2903 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2904
2905 echo "$as_me:2905: checking if we must define _GNU_SOURCE" >&5
2906 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2907 if test "${cf_cv_gnu_source+set}" = set; then
2908   echo $ECHO_N "(cached) $ECHO_C" >&6
2909 else
2910
2911 cat >conftest.$ac_ext <<_ACEOF
2912 #line 2912 "configure"
2913 #include "confdefs.h"
2914 #include <sys/types.h>
2915 int
2916 main ()
2917 {
2918
2919 #ifndef _XOPEN_SOURCE
2920 make an error
2921 #endif
2922   ;
2923   return 0;
2924 }
2925 _ACEOF
2926 rm -f conftest.$ac_objext
2927 if { (eval echo "$as_me:2927: \"$ac_compile\"") >&5
2928   (eval $ac_compile) 2>&5
2929   ac_status=$?
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit $ac_status); } &&
2932          { ac_try='test -s conftest.$ac_objext'
2933   { (eval echo "$as_me:2933: \"$ac_try\"") >&5
2934   (eval $ac_try) 2>&5
2935   ac_status=$?
2936   echo "$as_me:2936: \$? = $ac_status" >&5
2937   (exit $ac_status); }; }; then
2938   cf_cv_gnu_source=no
2939 else
2940   echo "$as_me: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 cf_save="$CPPFLAGS"
2943          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2944          cat >conftest.$ac_ext <<_ACEOF
2945 #line 2945 "configure"
2946 #include "confdefs.h"
2947 #include <sys/types.h>
2948 int
2949 main ()
2950 {
2951
2952 #ifdef _XOPEN_SOURCE
2953 make an error
2954 #endif
2955   ;
2956   return 0;
2957 }
2958 _ACEOF
2959 rm -f conftest.$ac_objext
2960 if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
2961   (eval $ac_compile) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); } &&
2965          { ac_try='test -s conftest.$ac_objext'
2966   { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2967   (eval $ac_try) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); }; }; then
2971   cf_cv_gnu_source=no
2972 else
2973   echo "$as_me: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 cf_cv_gnu_source=yes
2976 fi
2977 rm -f conftest.$ac_objext conftest.$ac_ext
2978         CPPFLAGS="$cf_save"
2979
2980 fi
2981 rm -f conftest.$ac_objext conftest.$ac_ext
2982
2983 fi
2984 echo "$as_me:2984: result: $cf_cv_gnu_source" >&5
2985 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2986 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2987
2988         ;;
2989 mirbsd*) #(vi
2990         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2991         cf_XOPEN_SOURCE=
2992
2993 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2994
2995 cf_save_CFLAGS="$CFLAGS"
2996 cf_save_CPPFLAGS="$CPPFLAGS"
2997
2998 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2999         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3000                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3001
3002 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3003         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3004                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3005
3006 echo "$as_me:3006: checking if we should define _POSIX_C_SOURCE" >&5
3007 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3008 if test "${cf_cv_posix_c_source+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011
3012 echo "${as_me:-configure}:3012: testing if the symbol is already defined go no further ..." 1>&5
3013
3014         cat >conftest.$ac_ext <<_ACEOF
3015 #line 3015 "configure"
3016 #include "confdefs.h"
3017 #include <sys/types.h>
3018 int
3019 main ()
3020 {
3021
3022 #ifndef _POSIX_C_SOURCE
3023 make an error
3024 #endif
3025   ;
3026   return 0;
3027 }
3028 _ACEOF
3029 rm -f conftest.$ac_objext
3030 if { (eval echo "$as_me:3030: \"$ac_compile\"") >&5
3031   (eval $ac_compile) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); } &&
3035          { ac_try='test -s conftest.$ac_objext'
3036   { (eval echo "$as_me:3036: \"$ac_try\"") >&5
3037   (eval $ac_try) 2>&5
3038   ac_status=$?
3039   echo "$as_me:3039: \$? = $ac_status" >&5
3040   (exit $ac_status); }; }; then
3041   cf_cv_posix_c_source=no
3042 else
3043   echo "$as_me: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
3045 cf_want_posix_source=no
3046          case .$cf_POSIX_C_SOURCE in #(vi
3047          .[12]??*) #(vi
3048                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3049                 ;;
3050          .2) #(vi
3051                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3052                 cf_want_posix_source=yes
3053                 ;;
3054          .*)
3055                 cf_want_posix_source=yes
3056                 ;;
3057          esac
3058          if test "$cf_want_posix_source" = yes ; then
3059                 cat >conftest.$ac_ext <<_ACEOF
3060 #line 3060 "configure"
3061 #include "confdefs.h"
3062 #include <sys/types.h>
3063 int
3064 main ()
3065 {
3066
3067 #ifdef _POSIX_SOURCE
3068 make an error
3069 #endif
3070   ;
3071   return 0;
3072 }
3073 _ACEOF
3074 rm -f conftest.$ac_objext
3075 if { (eval echo "$as_me:3075: \"$ac_compile\"") >&5
3076   (eval $ac_compile) 2>&5
3077   ac_status=$?
3078   echo "$as_me:3078: \$? = $ac_status" >&5
3079   (exit $ac_status); } &&
3080          { ac_try='test -s conftest.$ac_objext'
3081   { (eval echo "$as_me:3081: \"$ac_try\"") >&5
3082   (eval $ac_try) 2>&5
3083   ac_status=$?
3084   echo "$as_me:3084: \$? = $ac_status" >&5
3085   (exit $ac_status); }; }; then
3086   :
3087 else
3088   echo "$as_me: failed program was:" >&5
3089 cat conftest.$ac_ext >&5
3090 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3091 fi
3092 rm -f conftest.$ac_objext conftest.$ac_ext
3093          fi
3094
3095 echo "${as_me:-configure}:3095: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3096
3097          CFLAGS="$cf_trim_CFLAGS"
3098          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3099
3100 echo "${as_me:-configure}:3100: testing if the second compile does not leave our definition intact error ..." 1>&5
3101
3102          cat >conftest.$ac_ext <<_ACEOF
3103 #line 3103 "configure"
3104 #include "confdefs.h"
3105 #include <sys/types.h>
3106 int
3107 main ()
3108 {
3109
3110 #ifndef _POSIX_C_SOURCE
3111 make an error
3112 #endif
3113   ;
3114   return 0;
3115 }
3116 _ACEOF
3117 rm -f conftest.$ac_objext
3118 if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
3119   (eval $ac_compile) 2>&5
3120   ac_status=$?
3121   echo "$as_me:3121: \$? = $ac_status" >&5
3122   (exit $ac_status); } &&
3123          { ac_try='test -s conftest.$ac_objext'
3124   { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3125   (eval $ac_try) 2>&5
3126   ac_status=$?
3127   echo "$as_me:3127: \$? = $ac_status" >&5
3128   (exit $ac_status); }; }; then
3129   :
3130 else
3131   echo "$as_me: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 cf_cv_posix_c_source=no
3134 fi
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3136          CFLAGS="$cf_save_CFLAGS"
3137          CPPFLAGS="$cf_save_CPPFLAGS"
3138
3139 fi
3140 rm -f conftest.$ac_objext conftest.$ac_ext
3141
3142 fi
3143 echo "$as_me:3143: result: $cf_cv_posix_c_source" >&5
3144 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3145
3146 if test "$cf_cv_posix_c_source" != no ; then
3147         CFLAGS="$cf_trim_CFLAGS"
3148         CPPFLAGS="$cf_trim_CPPFLAGS"
3149
3150 cf_fix_cppflags=no
3151 cf_new_cflags=
3152 cf_new_cppflags=
3153 cf_new_extra_cppflags=
3154
3155 for cf_add_cflags in $cf_cv_posix_c_source
3156 do
3157 case $cf_fix_cppflags in
3158 no)
3159         case $cf_add_cflags in #(vi
3160         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3161                 case $cf_add_cflags in
3162                 -D*)
3163                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3164
3165                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3166                                 && test -z "${cf_tst_cflags}" \
3167                                 && cf_fix_cppflags=yes
3168
3169                         if test $cf_fix_cppflags = yes ; then
3170                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3171                                 continue
3172                         elif test "${cf_tst_cflags}" = "\"'" ; then
3173                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3174                                 continue
3175                         fi
3176                         ;;
3177                 esac
3178                 case "$CPPFLAGS" in
3179                 *$cf_add_cflags) #(vi
3180                         ;;
3181                 *) #(vi
3182                         case $cf_add_cflags in #(vi
3183                         -D*)
3184                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3185
3186 CPPFLAGS=`echo "$CPPFLAGS" | \
3187         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3188                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3189
3190                                 ;;
3191                         esac
3192                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3193                         ;;
3194                 esac
3195                 ;;
3196         *)
3197                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3198                 ;;
3199         esac
3200         ;;
3201 yes)
3202         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3203
3204         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3205
3206         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3207                 && test -z "${cf_tst_cflags}" \
3208                 && cf_fix_cppflags=no
3209         ;;
3210 esac
3211 done
3212
3213 if test -n "$cf_new_cflags" ; then
3214
3215         CFLAGS="$CFLAGS $cf_new_cflags"
3216 fi
3217
3218 if test -n "$cf_new_cppflags" ; then
3219
3220         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3221 fi
3222
3223 if test -n "$cf_new_extra_cppflags" ; then
3224
3225         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3226 fi
3227
3228 fi
3229
3230         ;;
3231 netbsd*) #(vi
3232         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3233         ;;
3234 openbsd[4-9]*) #(vi
3235         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3236         cf_xopen_source="-D_BSD_SOURCE"
3237         cf_XOPEN_SOURCE=600
3238         ;;
3239 openbsd*) #(vi
3240         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3241         ;;
3242 osf[45]*) #(vi
3243         cf_xopen_source="-D_OSF_SOURCE"
3244         ;;
3245 nto-qnx*) #(vi
3246         cf_xopen_source="-D_QNX_SOURCE"
3247         ;;
3248 sco*) #(vi
3249         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3250         ;;
3251 solaris2.*) #(vi
3252         cf_xopen_source="-D__EXTENSIONS__"
3253         ;;
3254 *)
3255
3256 echo "$as_me:3256: checking if we should define _XOPEN_SOURCE" >&5
3257 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3258 if test "${cf_cv_xopen_source+set}" = set; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261
3262         cat >conftest.$ac_ext <<_ACEOF
3263 #line 3263 "configure"
3264 #include "confdefs.h"
3265
3266 #include <stdlib.h>
3267 #include <string.h>
3268 #include <sys/types.h>
3269
3270 int
3271 main ()
3272 {
3273
3274 #ifndef _XOPEN_SOURCE
3275 make an error
3276 #endif
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 rm -f conftest.$ac_objext
3282 if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:3285: \$? = $ac_status" >&5
3286   (exit $ac_status); } &&
3287          { ac_try='test -s conftest.$ac_objext'
3288   { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:3291: \$? = $ac_status" >&5
3292   (exit $ac_status); }; }; then
3293   cf_cv_xopen_source=no
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat conftest.$ac_ext >&5
3297 cf_save="$CPPFLAGS"
3298          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3299          cat >conftest.$ac_ext <<_ACEOF
3300 #line 3300 "configure"
3301 #include "confdefs.h"
3302
3303 #include <stdlib.h>
3304 #include <string.h>
3305 #include <sys/types.h>
3306
3307 int
3308 main ()
3309 {
3310
3311 #ifdef _XOPEN_SOURCE
3312 make an error
3313 #endif
3314   ;
3315   return 0;
3316 }
3317 _ACEOF
3318 rm -f conftest.$ac_objext
3319 if { (eval echo "$as_me:3319: \"$ac_compile\"") >&5
3320   (eval $ac_compile) 2>&5
3321   ac_status=$?
3322   echo "$as_me:3322: \$? = $ac_status" >&5
3323   (exit $ac_status); } &&
3324          { ac_try='test -s conftest.$ac_objext'
3325   { (eval echo "$as_me:3325: \"$ac_try\"") >&5
3326   (eval $ac_try) 2>&5
3327   ac_status=$?
3328   echo "$as_me:3328: \$? = $ac_status" >&5
3329   (exit $ac_status); }; }; then
3330   cf_cv_xopen_source=no
3331 else
3332   echo "$as_me: failed program was:" >&5
3333 cat conftest.$ac_ext >&5
3334 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3335 fi
3336 rm -f conftest.$ac_objext conftest.$ac_ext
3337         CPPFLAGS="$cf_save"
3338
3339 fi
3340 rm -f conftest.$ac_objext conftest.$ac_ext
3341
3342 fi
3343 echo "$as_me:3343: result: $cf_cv_xopen_source" >&5
3344 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3345
3346 if test "$cf_cv_xopen_source" != no ; then
3347
3348 CFLAGS=`echo "$CFLAGS" | \
3349         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3350                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3351
3352 CPPFLAGS=`echo "$CPPFLAGS" | \
3353         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3354                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3355
3356         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3357
3358 cf_fix_cppflags=no
3359 cf_new_cflags=
3360 cf_new_cppflags=
3361 cf_new_extra_cppflags=
3362
3363 for cf_add_cflags in $cf_temp_xopen_source
3364 do
3365 case $cf_fix_cppflags in
3366 no)
3367         case $cf_add_cflags in #(vi
3368         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3369                 case $cf_add_cflags in
3370                 -D*)
3371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3372
3373                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3374                                 && test -z "${cf_tst_cflags}" \
3375                                 && cf_fix_cppflags=yes
3376
3377                         if test $cf_fix_cppflags = yes ; then
3378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3379                                 continue
3380                         elif test "${cf_tst_cflags}" = "\"'" ; then
3381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3382                                 continue
3383                         fi
3384                         ;;
3385                 esac
3386                 case "$CPPFLAGS" in
3387                 *$cf_add_cflags) #(vi
3388                         ;;
3389                 *) #(vi
3390                         case $cf_add_cflags in #(vi
3391                         -D*)
3392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3393
3394 CPPFLAGS=`echo "$CPPFLAGS" | \
3395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3397
3398                                 ;;
3399                         esac
3400                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3401                         ;;
3402                 esac
3403                 ;;
3404         *)
3405                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3406                 ;;
3407         esac
3408         ;;
3409 yes)
3410         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3411
3412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3413
3414         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3415                 && test -z "${cf_tst_cflags}" \
3416                 && cf_fix_cppflags=no
3417         ;;
3418 esac
3419 done
3420
3421 if test -n "$cf_new_cflags" ; then
3422
3423         CFLAGS="$CFLAGS $cf_new_cflags"
3424 fi
3425
3426 if test -n "$cf_new_cppflags" ; then
3427
3428         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3429 fi
3430
3431 if test -n "$cf_new_extra_cppflags" ; then
3432
3433         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3434 fi
3435
3436 fi
3437
3438 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3439
3440 cf_save_CFLAGS="$CFLAGS"
3441 cf_save_CPPFLAGS="$CPPFLAGS"
3442
3443 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3444         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3445                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3446
3447 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3448         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3449                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3450
3451 echo "$as_me:3451: checking if we should define _POSIX_C_SOURCE" >&5
3452 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3453 if test "${cf_cv_posix_c_source+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456
3457 echo "${as_me:-configure}:3457: testing if the symbol is already defined go no further ..." 1>&5
3458
3459         cat >conftest.$ac_ext <<_ACEOF
3460 #line 3460 "configure"
3461 #include "confdefs.h"
3462 #include <sys/types.h>
3463 int
3464 main ()
3465 {
3466
3467 #ifndef _POSIX_C_SOURCE
3468 make an error
3469 #endif
3470   ;
3471   return 0;
3472 }
3473 _ACEOF
3474 rm -f conftest.$ac_objext
3475 if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476   (eval $ac_compile) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit $ac_status); } &&
3480          { ac_try='test -s conftest.$ac_objext'
3481   { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482   (eval $ac_try) 2>&5
3483   ac_status=$?
3484   echo "$as_me:3484: \$? = $ac_status" >&5
3485   (exit $ac_status); }; }; then
3486   cf_cv_posix_c_source=no
3487 else
3488   echo "$as_me: failed program was:" >&5
3489 cat conftest.$ac_ext >&5
3490 cf_want_posix_source=no
3491          case .$cf_POSIX_C_SOURCE in #(vi
3492          .[12]??*) #(vi
3493                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3494                 ;;
3495          .2) #(vi
3496                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3497                 cf_want_posix_source=yes
3498                 ;;
3499          .*)
3500                 cf_want_posix_source=yes
3501                 ;;
3502          esac
3503          if test "$cf_want_posix_source" = yes ; then
3504                 cat >conftest.$ac_ext <<_ACEOF
3505 #line 3505 "configure"
3506 #include "confdefs.h"
3507 #include <sys/types.h>
3508 int
3509 main ()
3510 {
3511
3512 #ifdef _POSIX_SOURCE
3513 make an error
3514 #endif
3515   ;
3516   return 0;
3517 }
3518 _ACEOF
3519 rm -f conftest.$ac_objext
3520 if { (eval echo "$as_me:3520: \"$ac_compile\"") >&5
3521   (eval $ac_compile) 2>&5
3522   ac_status=$?
3523   echo "$as_me:3523: \$? = $ac_status" >&5
3524   (exit $ac_status); } &&
3525          { ac_try='test -s conftest.$ac_objext'
3526   { (eval echo "$as_me:3526: \"$ac_try\"") >&5
3527   (eval $ac_try) 2>&5
3528   ac_status=$?
3529   echo "$as_me:3529: \$? = $ac_status" >&5
3530   (exit $ac_status); }; }; then
3531   :
3532 else
3533   echo "$as_me: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3535 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3536 fi
3537 rm -f conftest.$ac_objext conftest.$ac_ext
3538          fi
3539
3540 echo "${as_me:-configure}:3540: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3541
3542          CFLAGS="$cf_trim_CFLAGS"
3543          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3544
3545 echo "${as_me:-configure}:3545: testing if the second compile does not leave our definition intact error ..." 1>&5
3546
3547          cat >conftest.$ac_ext <<_ACEOF
3548 #line 3548 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3551 int
3552 main ()
3553 {
3554
3555 #ifndef _POSIX_C_SOURCE
3556 make an error
3557 #endif
3558   ;
3559   return 0;
3560 }
3561 _ACEOF
3562 rm -f conftest.$ac_objext
3563 if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564   (eval $ac_compile) 2>&5
3565   ac_status=$?
3566   echo "$as_me:3566: \$? = $ac_status" >&5
3567   (exit $ac_status); } &&
3568          { ac_try='test -s conftest.$ac_objext'
3569   { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3570   (eval $ac_try) 2>&5
3571   ac_status=$?
3572   echo "$as_me:3572: \$? = $ac_status" >&5
3573   (exit $ac_status); }; }; then
3574   :
3575 else
3576   echo "$as_me: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 cf_cv_posix_c_source=no
3579 fi
3580 rm -f conftest.$ac_objext conftest.$ac_ext
3581          CFLAGS="$cf_save_CFLAGS"
3582          CPPFLAGS="$cf_save_CPPFLAGS"
3583
3584 fi
3585 rm -f conftest.$ac_objext conftest.$ac_ext
3586
3587 fi
3588 echo "$as_me:3588: result: $cf_cv_posix_c_source" >&5
3589 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3590
3591 if test "$cf_cv_posix_c_source" != no ; then
3592         CFLAGS="$cf_trim_CFLAGS"
3593         CPPFLAGS="$cf_trim_CPPFLAGS"
3594
3595 cf_fix_cppflags=no
3596 cf_new_cflags=
3597 cf_new_cppflags=
3598 cf_new_extra_cppflags=
3599
3600 for cf_add_cflags in $cf_cv_posix_c_source
3601 do
3602 case $cf_fix_cppflags in
3603 no)
3604         case $cf_add_cflags in #(vi
3605         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3606                 case $cf_add_cflags in
3607                 -D*)
3608                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3609
3610                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3611                                 && test -z "${cf_tst_cflags}" \
3612                                 && cf_fix_cppflags=yes
3613
3614                         if test $cf_fix_cppflags = yes ; then
3615                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3616                                 continue
3617                         elif test "${cf_tst_cflags}" = "\"'" ; then
3618                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3619                                 continue
3620                         fi
3621                         ;;
3622                 esac
3623                 case "$CPPFLAGS" in
3624                 *$cf_add_cflags) #(vi
3625                         ;;
3626                 *) #(vi
3627                         case $cf_add_cflags in #(vi
3628                         -D*)
3629                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3630
3631 CPPFLAGS=`echo "$CPPFLAGS" | \
3632         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3633                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3634
3635                                 ;;
3636                         esac
3637                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3638                         ;;
3639                 esac
3640                 ;;
3641         *)
3642                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3643                 ;;
3644         esac
3645         ;;
3646 yes)
3647         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3648
3649         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3650
3651         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3652                 && test -z "${cf_tst_cflags}" \
3653                 && cf_fix_cppflags=no
3654         ;;
3655 esac
3656 done
3657
3658 if test -n "$cf_new_cflags" ; then
3659
3660         CFLAGS="$CFLAGS $cf_new_cflags"
3661 fi
3662
3663 if test -n "$cf_new_cppflags" ; then
3664
3665         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3666 fi
3667
3668 if test -n "$cf_new_extra_cppflags" ; then
3669
3670         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3671 fi
3672
3673 fi
3674
3675         ;;
3676 esac
3677
3678 if test -n "$cf_xopen_source" ; then
3679
3680 cf_fix_cppflags=no
3681 cf_new_cflags=
3682 cf_new_cppflags=
3683 cf_new_extra_cppflags=
3684
3685 for cf_add_cflags in $cf_xopen_source
3686 do
3687 case $cf_fix_cppflags in
3688 no)
3689         case $cf_add_cflags in #(vi
3690         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3691                 case $cf_add_cflags in
3692                 -D*)
3693                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3694
3695                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3696                                 && test -z "${cf_tst_cflags}" \
3697                                 && cf_fix_cppflags=yes
3698
3699                         if test $cf_fix_cppflags = yes ; then
3700                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3701                                 continue
3702                         elif test "${cf_tst_cflags}" = "\"'" ; then
3703                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3704                                 continue
3705                         fi
3706                         ;;
3707                 esac
3708                 case "$CPPFLAGS" in
3709                 *$cf_add_cflags) #(vi
3710                         ;;
3711                 *) #(vi
3712                         case $cf_add_cflags in #(vi
3713                         -D*)
3714                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3715
3716 CPPFLAGS=`echo "$CPPFLAGS" | \
3717         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3718                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3719
3720                                 ;;
3721                         esac
3722                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3723                         ;;
3724                 esac
3725                 ;;
3726         *)
3727                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3728                 ;;
3729         esac
3730         ;;
3731 yes)
3732         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3733
3734         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3735
3736         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3737                 && test -z "${cf_tst_cflags}" \
3738                 && cf_fix_cppflags=no
3739         ;;
3740 esac
3741 done
3742
3743 if test -n "$cf_new_cflags" ; then
3744
3745         CFLAGS="$CFLAGS $cf_new_cflags"
3746 fi
3747
3748 if test -n "$cf_new_cppflags" ; then
3749
3750         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3751 fi
3752
3753 if test -n "$cf_new_extra_cppflags" ; then
3754
3755         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3756 fi
3757
3758 fi
3759
3760 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3761         echo "$as_me:3761: checking if _XOPEN_SOURCE really is set" >&5
3762 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3763         cat >conftest.$ac_ext <<_ACEOF
3764 #line 3764 "configure"
3765 #include "confdefs.h"
3766 #include <stdlib.h>
3767 int
3768 main ()
3769 {
3770
3771 #ifndef _XOPEN_SOURCE
3772 make an error
3773 #endif
3774   ;
3775   return 0;
3776 }
3777 _ACEOF
3778 rm -f conftest.$ac_objext
3779 if { (eval echo "$as_me:3779: \"$ac_compile\"") >&5
3780   (eval $ac_compile) 2>&5
3781   ac_status=$?
3782   echo "$as_me:3782: \$? = $ac_status" >&5
3783   (exit $ac_status); } &&
3784          { ac_try='test -s conftest.$ac_objext'
3785   { (eval echo "$as_me:3785: \"$ac_try\"") >&5
3786   (eval $ac_try) 2>&5
3787   ac_status=$?
3788   echo "$as_me:3788: \$? = $ac_status" >&5
3789   (exit $ac_status); }; }; then
3790   cf_XOPEN_SOURCE_set=yes
3791 else
3792   echo "$as_me: failed program was:" >&5
3793 cat conftest.$ac_ext >&5
3794 cf_XOPEN_SOURCE_set=no
3795 fi
3796 rm -f conftest.$ac_objext conftest.$ac_ext
3797         echo "$as_me:3797: result: $cf_XOPEN_SOURCE_set" >&5
3798 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3799         if test $cf_XOPEN_SOURCE_set = yes
3800         then
3801                 cat >conftest.$ac_ext <<_ACEOF
3802 #line 3802 "configure"
3803 #include "confdefs.h"
3804 #include <stdlib.h>
3805 int
3806 main ()
3807 {
3808
3809 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3810 make an error
3811 #endif
3812   ;
3813   return 0;
3814 }
3815 _ACEOF
3816 rm -f conftest.$ac_objext
3817 if { (eval echo "$as_me:3817: \"$ac_compile\"") >&5
3818   (eval $ac_compile) 2>&5
3819   ac_status=$?
3820   echo "$as_me:3820: \$? = $ac_status" >&5
3821   (exit $ac_status); } &&
3822          { ac_try='test -s conftest.$ac_objext'
3823   { (eval echo "$as_me:3823: \"$ac_try\"") >&5
3824   (eval $ac_try) 2>&5
3825   ac_status=$?
3826   echo "$as_me:3826: \$? = $ac_status" >&5
3827   (exit $ac_status); }; }; then
3828   cf_XOPEN_SOURCE_set_ok=yes
3829 else
3830   echo "$as_me: failed program was:" >&5
3831 cat conftest.$ac_ext >&5
3832 cf_XOPEN_SOURCE_set_ok=no
3833 fi
3834 rm -f conftest.$ac_objext conftest.$ac_ext
3835                 if test $cf_XOPEN_SOURCE_set_ok = no
3836                 then
3837                         { echo "$as_me:3837: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3838 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3839                 fi
3840         else
3841
3842 echo "$as_me:3842: checking if we should define _XOPEN_SOURCE" >&5
3843 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3844 if test "${cf_cv_xopen_source+set}" = set; then
3845   echo $ECHO_N "(cached) $ECHO_C" >&6
3846 else
3847
3848         cat >conftest.$ac_ext <<_ACEOF
3849 #line 3849 "configure"
3850 #include "confdefs.h"
3851
3852 #include <stdlib.h>
3853 #include <string.h>
3854 #include <sys/types.h>
3855
3856 int
3857 main ()
3858 {
3859
3860 #ifndef _XOPEN_SOURCE
3861 make an error
3862 #endif
3863   ;
3864   return 0;
3865 }
3866 _ACEOF
3867 rm -f conftest.$ac_objext
3868 if { (eval echo "$as_me:3868: \"$ac_compile\"") >&5
3869   (eval $ac_compile) 2>&5
3870   ac_status=$?
3871   echo "$as_me:3871: \$? = $ac_status" >&5
3872   (exit $ac_status); } &&
3873          { ac_try='test -s conftest.$ac_objext'
3874   { (eval echo "$as_me:3874: \"$ac_try\"") >&5
3875   (eval $ac_try) 2>&5
3876   ac_status=$?
3877   echo "$as_me:3877: \$? = $ac_status" >&5
3878   (exit $ac_status); }; }; then
3879   cf_cv_xopen_source=no
3880 else
3881   echo "$as_me: failed program was:" >&5
3882 cat conftest.$ac_ext >&5
3883 cf_save="$CPPFLAGS"
3884          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3885          cat >conftest.$ac_ext <<_ACEOF
3886 #line 3886 "configure"
3887 #include "confdefs.h"
3888
3889 #include <stdlib.h>
3890 #include <string.h>
3891 #include <sys/types.h>
3892
3893 int
3894 main ()
3895 {
3896
3897 #ifdef _XOPEN_SOURCE
3898 make an error
3899 #endif
3900   ;
3901   return 0;
3902 }
3903 _ACEOF
3904 rm -f conftest.$ac_objext
3905 if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
3906   (eval $ac_compile) 2>&5
3907   ac_status=$?
3908   echo "$as_me:3908: \$? = $ac_status" >&5
3909   (exit $ac_status); } &&
3910          { ac_try='test -s conftest.$ac_objext'
3911   { (eval echo "$as_me:3911: \"$ac_try\"") >&5
3912   (eval $ac_try) 2>&5
3913   ac_status=$?
3914   echo "$as_me:3914: \$? = $ac_status" >&5
3915   (exit $ac_status); }; }; then
3916   cf_cv_xopen_source=no
3917 else
3918   echo "$as_me: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
3920 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3921 fi
3922 rm -f conftest.$ac_objext conftest.$ac_ext
3923         CPPFLAGS="$cf_save"
3924
3925 fi
3926 rm -f conftest.$ac_objext conftest.$ac_ext
3927
3928 fi
3929 echo "$as_me:3929: result: $cf_cv_xopen_source" >&5
3930 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3931
3932 if test "$cf_cv_xopen_source" != no ; then
3933
3934 CFLAGS=`echo "$CFLAGS" | \
3935         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3936                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3937
3938 CPPFLAGS=`echo "$CPPFLAGS" | \
3939         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3940                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3941
3942         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3943
3944 cf_fix_cppflags=no
3945 cf_new_cflags=
3946 cf_new_cppflags=
3947 cf_new_extra_cppflags=
3948
3949 for cf_add_cflags in $cf_temp_xopen_source
3950 do
3951 case $cf_fix_cppflags in
3952 no)
3953         case $cf_add_cflags in #(vi
3954         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3955                 case $cf_add_cflags in
3956                 -D*)
3957                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3958
3959                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3960                                 && test -z "${cf_tst_cflags}" \
3961                                 && cf_fix_cppflags=yes
3962
3963                         if test $cf_fix_cppflags = yes ; then
3964                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3965                                 continue
3966                         elif test "${cf_tst_cflags}" = "\"'" ; then
3967                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3968                                 continue
3969                         fi
3970                         ;;
3971                 esac
3972                 case "$CPPFLAGS" in
3973                 *$cf_add_cflags) #(vi
3974                         ;;
3975                 *) #(vi
3976                         case $cf_add_cflags in #(vi
3977                         -D*)
3978                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3979
3980 CPPFLAGS=`echo "$CPPFLAGS" | \
3981         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3982                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3983
3984                                 ;;
3985                         esac
3986                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3987                         ;;
3988                 esac
3989                 ;;
3990         *)
3991                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3992                 ;;
3993         esac
3994         ;;
3995 yes)
3996         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3997
3998         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3999
4000         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4001                 && test -z "${cf_tst_cflags}" \
4002                 && cf_fix_cppflags=no
4003         ;;
4004 esac
4005 done
4006
4007 if test -n "$cf_new_cflags" ; then
4008
4009         CFLAGS="$CFLAGS $cf_new_cflags"
4010 fi
4011
4012 if test -n "$cf_new_cppflags" ; then
4013
4014         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4015 fi
4016
4017 if test -n "$cf_new_extra_cppflags" ; then
4018
4019         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4020 fi
4021
4022 fi
4023
4024         fi
4025 fi
4026
4027 # Check whether --enable-largefile or --disable-largefile was given.
4028 if test "${enable_largefile+set}" = set; then
4029   enableval="$enable_largefile"
4030
4031 fi;
4032 if test "$enable_largefile" != no; then
4033
4034   echo "$as_me:4034: checking for special C compiler options needed for large files" >&5
4035 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4036 if test "${ac_cv_sys_largefile_CC+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039   ac_cv_sys_largefile_CC=no
4040      if test "$GCC" != yes; then
4041        ac_save_CC=$CC
4042        while :; do
4043          # IRIX 6.2 and later do not support large files by default,
4044          # so use the C compiler's -n32 option if that helps.
4045          cat >conftest.$ac_ext <<_ACEOF
4046 #line 4046 "configure"
4047 #include "confdefs.h"
4048 #include <sys/types.h>
4049  /* Check that off_t can represent 2**63 - 1 correctly.
4050     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4051     since some C++ compilers masquerading as C compilers
4052     incorrectly reject 9223372036854775807.  */
4053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4054   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4055                        && LARGE_OFF_T % 2147483647 == 1)
4056                       ? 1 : -1];
4057 int
4058 main ()
4059 {
4060
4061   ;
4062   return 0;
4063 }
4064 _ACEOF
4065          rm -f conftest.$ac_objext
4066 if { (eval echo "$as_me:4066: \"$ac_compile\"") >&5
4067   (eval $ac_compile) 2>&5
4068   ac_status=$?
4069   echo "$as_me:4069: \$? = $ac_status" >&5
4070   (exit $ac_status); } &&
4071          { ac_try='test -s conftest.$ac_objext'
4072   { (eval echo "$as_me:4072: \"$ac_try\"") >&5
4073   (eval $ac_try) 2>&5
4074   ac_status=$?
4075   echo "$as_me:4075: \$? = $ac_status" >&5
4076   (exit $ac_status); }; }; then
4077   break
4078 else
4079   echo "$as_me: failed program was:" >&5
4080 cat conftest.$ac_ext >&5
4081 fi
4082 rm -f conftest.$ac_objext
4083          CC="$CC -n32"
4084          rm -f conftest.$ac_objext
4085 if { (eval echo "$as_me:4085: \"$ac_compile\"") >&5
4086   (eval $ac_compile) 2>&5
4087   ac_status=$?
4088   echo "$as_me:4088: \$? = $ac_status" >&5
4089   (exit $ac_status); } &&
4090          { ac_try='test -s conftest.$ac_objext'
4091   { (eval echo "$as_me:4091: \"$ac_try\"") >&5
4092   (eval $ac_try) 2>&5
4093   ac_status=$?
4094   echo "$as_me:4094: \$? = $ac_status" >&5
4095   (exit $ac_status); }; }; then
4096   ac_cv_sys_largefile_CC=' -n32'; break
4097 else
4098   echo "$as_me: failed program was:" >&5
4099 cat conftest.$ac_ext >&5
4100 fi
4101 rm -f conftest.$ac_objext
4102          break
4103        done
4104        CC=$ac_save_CC
4105        rm -f conftest.$ac_ext
4106     fi
4107 fi
4108 echo "$as_me:4108: result: $ac_cv_sys_largefile_CC" >&5
4109 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4110   if test "$ac_cv_sys_largefile_CC" != no; then
4111     CC=$CC$ac_cv_sys_largefile_CC
4112   fi
4113
4114   echo "$as_me:4114: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4115 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4116 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   while :; do
4120   ac_cv_sys_file_offset_bits=no
4121   cat >conftest.$ac_ext <<_ACEOF
4122 #line 4122 "configure"
4123 #include "confdefs.h"
4124 #include <sys/types.h>
4125  /* Check that off_t can represent 2**63 - 1 correctly.
4126     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4127     since some C++ compilers masquerading as C compilers
4128     incorrectly reject 9223372036854775807.  */
4129 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4130   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4131                        && LARGE_OFF_T % 2147483647 == 1)
4132                       ? 1 : -1];
4133 int
4134 main ()
4135 {
4136
4137   ;
4138   return 0;
4139 }
4140 _ACEOF
4141 rm -f conftest.$ac_objext
4142 if { (eval echo "$as_me:4142: \"$ac_compile\"") >&5
4143   (eval $ac_compile) 2>&5
4144   ac_status=$?
4145   echo "$as_me:4145: \$? = $ac_status" >&5
4146   (exit $ac_status); } &&
4147          { ac_try='test -s conftest.$ac_objext'
4148   { (eval echo "$as_me:4148: \"$ac_try\"") >&5
4149   (eval $ac_try) 2>&5
4150   ac_status=$?
4151   echo "$as_me:4151: \$? = $ac_status" >&5
4152   (exit $ac_status); }; }; then
4153   break
4154 else
4155   echo "$as_me: failed program was:" >&5
4156 cat conftest.$ac_ext >&5
4157 fi
4158 rm -f conftest.$ac_objext conftest.$ac_ext
4159   cat >conftest.$ac_ext <<_ACEOF
4160 #line 4160 "configure"
4161 #include "confdefs.h"
4162 #define _FILE_OFFSET_BITS 64
4163 #include <sys/types.h>
4164  /* Check that off_t can represent 2**63 - 1 correctly.
4165     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4166     since some C++ compilers masquerading as C compilers
4167     incorrectly reject 9223372036854775807.  */
4168 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4169   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4170                        && LARGE_OFF_T % 2147483647 == 1)
4171                       ? 1 : -1];
4172 int
4173 main ()
4174 {
4175
4176   ;
4177   return 0;
4178 }
4179 _ACEOF
4180 rm -f conftest.$ac_objext
4181 if { (eval echo "$as_me:4181: \"$ac_compile\"") >&5
4182   (eval $ac_compile) 2>&5
4183   ac_status=$?
4184   echo "$as_me:4184: \$? = $ac_status" >&5
4185   (exit $ac_status); } &&
4186          { ac_try='test -s conftest.$ac_objext'
4187   { (eval echo "$as_me:4187: \"$ac_try\"") >&5
4188   (eval $ac_try) 2>&5
4189   ac_status=$?
4190   echo "$as_me:4190: \$? = $ac_status" >&5
4191   (exit $ac_status); }; }; then
4192   ac_cv_sys_file_offset_bits=64; break
4193 else
4194   echo "$as_me: failed program was:" >&5
4195 cat conftest.$ac_ext >&5
4196 fi
4197 rm -f conftest.$ac_objext conftest.$ac_ext
4198   break
4199 done
4200 fi
4201 echo "$as_me:4201: result: $ac_cv_sys_file_offset_bits" >&5
4202 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4203 if test "$ac_cv_sys_file_offset_bits" != no; then
4204
4205 cat >>confdefs.h <<EOF
4206 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4207 EOF
4208
4209 fi
4210 rm -rf conftest*
4211   echo "$as_me:4211: checking for _LARGE_FILES value needed for large files" >&5
4212 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4213 if test "${ac_cv_sys_large_files+set}" = set; then
4214   echo $ECHO_N "(cached) $ECHO_C" >&6
4215 else
4216   while :; do
4217   ac_cv_sys_large_files=no
4218   cat >conftest.$ac_ext <<_ACEOF
4219 #line 4219 "configure"
4220 #include "confdefs.h"
4221 #include <sys/types.h>
4222  /* Check that off_t can represent 2**63 - 1 correctly.
4223     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4224     since some C++ compilers masquerading as C compilers
4225     incorrectly reject 9223372036854775807.  */
4226 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4227   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4228                        && LARGE_OFF_T % 2147483647 == 1)
4229                       ? 1 : -1];
4230 int
4231 main ()
4232 {
4233
4234   ;
4235   return 0;
4236 }
4237 _ACEOF
4238 rm -f conftest.$ac_objext
4239 if { (eval echo "$as_me:4239: \"$ac_compile\"") >&5
4240   (eval $ac_compile) 2>&5
4241   ac_status=$?
4242   echo "$as_me:4242: \$? = $ac_status" >&5
4243   (exit $ac_status); } &&
4244          { ac_try='test -s conftest.$ac_objext'
4245   { (eval echo "$as_me:4245: \"$ac_try\"") >&5
4246   (eval $ac_try) 2>&5
4247   ac_status=$?
4248   echo "$as_me:4248: \$? = $ac_status" >&5
4249   (exit $ac_status); }; }; then
4250   break
4251 else
4252   echo "$as_me: failed program was:" >&5
4253 cat conftest.$ac_ext >&5
4254 fi
4255 rm -f conftest.$ac_objext conftest.$ac_ext
4256   cat >conftest.$ac_ext <<_ACEOF
4257 #line 4257 "configure"
4258 #include "confdefs.h"
4259 #define _LARGE_FILES 1
4260 #include <sys/types.h>
4261  /* Check that off_t can represent 2**63 - 1 correctly.
4262     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4263     since some C++ compilers masquerading as C compilers
4264     incorrectly reject 9223372036854775807.  */
4265 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4266   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4267                        && LARGE_OFF_T % 2147483647 == 1)
4268                       ? 1 : -1];
4269 int
4270 main ()
4271 {
4272
4273   ;
4274   return 0;
4275 }
4276 _ACEOF
4277 rm -f conftest.$ac_objext
4278 if { (eval echo "$as_me:4278: \"$ac_compile\"") >&5
4279   (eval $ac_compile) 2>&5
4280   ac_status=$?
4281   echo "$as_me:4281: \$? = $ac_status" >&5
4282   (exit $ac_status); } &&
4283          { ac_try='test -s conftest.$ac_objext'
4284   { (eval echo "$as_me:4284: \"$ac_try\"") >&5
4285   (eval $ac_try) 2>&5
4286   ac_status=$?
4287   echo "$as_me:4287: \$? = $ac_status" >&5
4288   (exit $ac_status); }; }; then
4289   ac_cv_sys_large_files=1; break
4290 else
4291   echo "$as_me: failed program was:" >&5
4292 cat conftest.$ac_ext >&5
4293 fi
4294 rm -f conftest.$ac_objext conftest.$ac_ext
4295   break
4296 done
4297 fi
4298 echo "$as_me:4298: result: $ac_cv_sys_large_files" >&5
4299 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4300 if test "$ac_cv_sys_large_files" != no; then
4301
4302 cat >>confdefs.h <<EOF
4303 #define _LARGE_FILES $ac_cv_sys_large_files
4304 EOF
4305
4306 fi
4307 rm -rf conftest*
4308 fi
4309
4310     if test "$enable_largefile" != no ; then
4311         echo "$as_me:4311: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4312 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
4313 if test "${ac_cv_sys_largefile_source+set}" = set; then
4314   echo $ECHO_N "(cached) $ECHO_C" >&6
4315 else
4316   while :; do
4317   ac_cv_sys_largefile_source=no
4318   cat >conftest.$ac_ext <<_ACEOF
4319 #line 4319 "configure"
4320 #include "confdefs.h"
4321 #include <stdio.h>
4322 int
4323 main ()
4324 {
4325 return !fseeko;
4326   ;
4327   return 0;
4328 }
4329 _ACEOF
4330 rm -f conftest.$ac_objext
4331 if { (eval echo "$as_me:4331: \"$ac_compile\"") >&5
4332   (eval $ac_compile) 2>&5
4333   ac_status=$?
4334   echo "$as_me:4334: \$? = $ac_status" >&5
4335   (exit $ac_status); } &&
4336          { ac_try='test -s conftest.$ac_objext'
4337   { (eval echo "$as_me:4337: \"$ac_try\"") >&5
4338   (eval $ac_try) 2>&5
4339   ac_status=$?
4340   echo "$as_me:4340: \$? = $ac_status" >&5
4341   (exit $ac_status); }; }; then
4342   break
4343 else
4344   echo "$as_me: failed program was:" >&5
4345 cat conftest.$ac_ext >&5
4346 fi
4347 rm -f conftest.$ac_objext conftest.$ac_ext
4348   cat >conftest.$ac_ext <<_ACEOF
4349 #line 4349 "configure"
4350 #include "confdefs.h"
4351 #define _LARGEFILE_SOURCE 1
4352 #include <stdio.h>
4353 int
4354 main ()
4355 {
4356 return !fseeko;
4357   ;
4358   return 0;
4359 }
4360 _ACEOF
4361 rm -f conftest.$ac_objext
4362 if { (eval echo "$as_me:4362: \"$ac_compile\"") >&5
4363   (eval $ac_compile) 2>&5
4364   ac_status=$?
4365   echo "$as_me:4365: \$? = $ac_status" >&5
4366   (exit $ac_status); } &&
4367          { ac_try='test -s conftest.$ac_objext'
4368   { (eval echo "$as_me:4368: \"$ac_try\"") >&5
4369   (eval $ac_try) 2>&5
4370   ac_status=$?
4371   echo "$as_me:4371: \$? = $ac_status" >&5
4372   (exit $ac_status); }; }; then
4373   ac_cv_sys_largefile_source=1; break
4374 else
4375   echo "$as_me: failed program was:" >&5
4376 cat conftest.$ac_ext >&5
4377 fi
4378 rm -f conftest.$ac_objext conftest.$ac_ext
4379   break
4380 done
4381 fi
4382 echo "$as_me:4382: result: $ac_cv_sys_largefile_source" >&5
4383 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
4384 if test "$ac_cv_sys_largefile_source" != no; then
4385
4386 cat >>confdefs.h <<EOF
4387 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4388 EOF
4389
4390 fi
4391 rm -rf conftest*
4392
4393 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4394 # in glibc 2.1.3, but that breaks too many other things.
4395 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4396 echo "$as_me:4396: checking for fseeko" >&5
4397 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
4398 if test "${ac_cv_func_fseeko+set}" = set; then
4399   echo $ECHO_N "(cached) $ECHO_C" >&6
4400 else
4401   cat >conftest.$ac_ext <<_ACEOF
4402 #line 4402 "configure"
4403 #include "confdefs.h"
4404 #include <stdio.h>
4405 int
4406 main ()
4407 {
4408 return fseeko && fseeko (stdin, 0, 0);
4409   ;
4410   return 0;
4411 }
4412 _ACEOF
4413 rm -f conftest.$ac_objext conftest$ac_exeext
4414 if { (eval echo "$as_me:4414: \"$ac_link\"") >&5
4415   (eval $ac_link) 2>&5
4416   ac_status=$?
4417   echo "$as_me:4417: \$? = $ac_status" >&5
4418   (exit $ac_status); } &&
4419          { ac_try='test -s conftest$ac_exeext'
4420   { (eval echo "$as_me:4420: \"$ac_try\"") >&5
4421   (eval $ac_try) 2>&5
4422   ac_status=$?
4423   echo "$as_me:4423: \$? = $ac_status" >&5
4424   (exit $ac_status); }; }; then
4425   ac_cv_func_fseeko=yes
4426 else
4427   echo "$as_me: failed program was:" >&5
4428 cat conftest.$ac_ext >&5
4429 ac_cv_func_fseeko=no
4430 fi
4431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4432 fi
4433 echo "$as_me:4433: result: $ac_cv_func_fseeko" >&5
4434 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
4435 if test $ac_cv_func_fseeko = yes; then
4436
4437 cat >>confdefs.h <<\EOF
4438 #define HAVE_FSEEKO 1
4439 EOF
4440
4441 fi
4442
4443         # Normally we would collect these definitions in the config.h,
4444         # but (like _XOPEN_SOURCE), some environments rely on having these
4445         # defined before any of the system headers are included.  Another
4446         # case comes up with C++, e.g., on AIX the compiler compiles the
4447         # header files by themselves before looking at the body files it is
4448         # told to compile.  For ncurses, those header files do not include
4449         # the config.h
4450         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
4451         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
4452         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
4453
4454         echo "$as_me:4454: checking whether to use struct dirent64" >&5
4455 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
4456 if test "${cf_cv_struct_dirent64+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459
4460                 cat >conftest.$ac_ext <<_ACEOF
4461 #line 4461 "configure"
4462 #include "confdefs.h"
4463
4464 #include <sys/types.h>
4465 #include <dirent.h>
4466
4467 int
4468 main ()
4469 {
4470
4471                 /* if transitional largefile support is setup, this is true */
4472                 extern struct dirent64 * readdir(DIR *);
4473                 struct dirent64 *x = readdir((DIR *)0);
4474                 struct dirent *y = readdir((DIR *)0);
4475                 int z = x - y;
4476
4477   ;
4478   return 0;
4479 }
4480 _ACEOF
4481 rm -f conftest.$ac_objext
4482 if { (eval echo "$as_me:4482: \"$ac_compile\"") >&5
4483   (eval $ac_compile) 2>&5
4484   ac_status=$?
4485   echo "$as_me:4485: \$? = $ac_status" >&5
4486   (exit $ac_status); } &&
4487          { ac_try='test -s conftest.$ac_objext'
4488   { (eval echo "$as_me:4488: \"$ac_try\"") >&5
4489   (eval $ac_try) 2>&5
4490   ac_status=$?
4491   echo "$as_me:4491: \$? = $ac_status" >&5
4492   (exit $ac_status); }; }; then
4493   cf_cv_struct_dirent64=yes
4494 else
4495   echo "$as_me: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4497 cf_cv_struct_dirent64=no
4498 fi
4499 rm -f conftest.$ac_objext conftest.$ac_ext
4500
4501 fi
4502 echo "$as_me:4502: result: $cf_cv_struct_dirent64" >&5
4503 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
4504         test "$cf_cv_struct_dirent64" = yes &&
4505 cat >>confdefs.h <<\EOF
4506 #define HAVE_STRUCT_DIRENT64 1
4507 EOF
4508
4509     fi
4510
4511 if ( test "$GCC" = yes || test "$GXX" = yes )
4512 then
4513 echo "$as_me:4513: checking if you want to check for gcc warnings" >&5
4514 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
4515
4516 # Check whether --with-warnings or --without-warnings was given.
4517 if test "${with_warnings+set}" = set; then
4518   withval="$with_warnings"
4519   cf_opt_with_warnings=$withval
4520 else
4521   cf_opt_with_warnings=no
4522 fi;
4523 echo "$as_me:4523: result: $cf_opt_with_warnings" >&5
4524 echo "${ECHO_T}$cf_opt_with_warnings" >&6
4525 if test "$cf_opt_with_warnings" != no ; then
4526
4527 if test "$GCC" = yes
4528 then
4529 cat > conftest.i <<EOF
4530 #ifndef GCC_PRINTF
4531 #define GCC_PRINTF 0
4532 #endif
4533 #ifndef GCC_SCANF
4534 #define GCC_SCANF 0
4535 #endif
4536 #ifndef GCC_NORETURN
4537 #define GCC_NORETURN /* nothing */
4538 #endif
4539 #ifndef GCC_UNUSED
4540 #define GCC_UNUSED /* nothing */
4541 #endif
4542 EOF
4543 if test "$GCC" = yes
4544 then
4545         { echo "$as_me:4545: checking for $CC __attribute__ directives..." >&5
4546 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4548 "${as_me:-configure}"
4549 #include "confdefs.h"
4550 #include "conftest.h"
4551 #include "conftest.i"
4552 #if     GCC_PRINTF
4553 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4554 #else
4555 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4556 #endif
4557 #if     GCC_SCANF
4558 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4559 #else
4560 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4561 #endif
4562 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4563 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4564 extern void foo(void) GCC_NORETURN;
4565 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4566 EOF
4567         cf_printf_attribute=no
4568         cf_scanf_attribute=no
4569         for cf_attribute in scanf printf unused noreturn
4570         do
4571
4572 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4573
4574                 cf_directive="__attribute__(($cf_attribute))"
4575                 echo "checking for $CC $cf_directive" 1>&5
4576
4577                 case $cf_attribute in #(vi
4578                 printf) #(vi
4579                         cf_printf_attribute=yes
4580                         cat >conftest.h <<EOF
4581 #define GCC_$cf_ATTRIBUTE 1
4582 EOF
4583                         ;;
4584                 scanf) #(vi
4585                         cf_scanf_attribute=yes
4586                         cat >conftest.h <<EOF
4587 #define GCC_$cf_ATTRIBUTE 1
4588 EOF
4589                         ;;
4590                 *) #(vi
4591                         cat >conftest.h <<EOF
4592 #define GCC_$cf_ATTRIBUTE $cf_directive
4593 EOF
4594                         ;;
4595                 esac
4596
4597                 if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
4598   (eval $ac_compile) 2>&5
4599   ac_status=$?
4600   echo "$as_me:4600: \$? = $ac_status" >&5
4601   (exit $ac_status); }; then
4602                         test -n "$verbose" && echo "$as_me:4602: result: ... $cf_attribute" >&5
4603 echo "${ECHO_T}... $cf_attribute" >&6
4604                         cat conftest.h >>confdefs.h
4605                         case $cf_attribute in #(vi
4606                         noreturn) #(vi
4607
4608 cat >>confdefs.h <<EOF
4609 #define GCC_NORETURN $cf_directive
4610 EOF
4611
4612                                 ;;
4613                         printf) #(vi
4614                                 cf_value='/* nothing */'
4615                                 if test "$cf_printf_attribute" != no ; then
4616                                         cf_value='__attribute__((format(printf,fmt,var)))'
4617
4618 cat >>confdefs.h <<\EOF
4619 #define GCC_PRINTF 1
4620 EOF
4621
4622                                 fi
4623
4624 cat >>confdefs.h <<EOF
4625 #define GCC_PRINTFLIKE(fmt,var) $cf_value
4626 EOF
4627
4628                                 ;;
4629                         scanf) #(vi
4630                                 cf_value='/* nothing */'
4631                                 if test "$cf_scanf_attribute" != no ; then
4632                                         cf_value='__attribute__((format(scanf,fmt,var)))'
4633
4634 cat >>confdefs.h <<\EOF
4635 #define GCC_SCANF 1
4636 EOF
4637
4638                                 fi
4639
4640 cat >>confdefs.h <<EOF
4641 #define GCC_SCANFLIKE(fmt,var) $cf_value
4642 EOF
4643
4644                                 ;;
4645                         unused) #(vi
4646
4647 cat >>confdefs.h <<EOF
4648 #define GCC_UNUSED $cf_directive
4649 EOF
4650
4651                                 ;;
4652                         esac
4653                 fi
4654         done
4655 else
4656         fgrep define conftest.i >>confdefs.h
4657 fi
4658 rm -rf conftest*
4659 fi
4660
4661 INTEL_COMPILER=no
4662
4663 if test "$GCC" = yes ; then
4664         case $host_os in
4665         linux*|gnu*)
4666                 echo "$as_me:4666: checking if this is really Intel C compiler" >&5
4667 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4668                 cf_save_CFLAGS="$CFLAGS"
4669                 CFLAGS="$CFLAGS -no-gcc"
4670                 cat >conftest.$ac_ext <<_ACEOF
4671 #line 4671 "configure"
4672 #include "confdefs.h"
4673
4674 int
4675 main ()
4676 {
4677
4678 #ifdef __INTEL_COMPILER
4679 #else
4680 make an error
4681 #endif
4682
4683   ;
4684   return 0;
4685 }
4686 _ACEOF
4687 rm -f conftest.$ac_objext
4688 if { (eval echo "$as_me:4688: \"$ac_compile\"") >&5
4689   (eval $ac_compile) 2>&5
4690   ac_status=$?
4691   echo "$as_me:4691: \$? = $ac_status" >&5
4692   (exit $ac_status); } &&
4693          { ac_try='test -s conftest.$ac_objext'
4694   { (eval echo "$as_me:4694: \"$ac_try\"") >&5
4695   (eval $ac_try) 2>&5
4696   ac_status=$?
4697   echo "$as_me:4697: \$? = $ac_status" >&5
4698   (exit $ac_status); }; }; then
4699   INTEL_COMPILER=yes
4700 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4701
4702 else
4703   echo "$as_me: failed program was:" >&5
4704 cat conftest.$ac_ext >&5
4705 fi
4706 rm -f conftest.$ac_objext conftest.$ac_ext
4707                 CFLAGS="$cf_save_CFLAGS"
4708                 echo "$as_me:4708: result: $INTEL_COMPILER" >&5
4709 echo "${ECHO_T}$INTEL_COMPILER" >&6
4710                 ;;
4711         esac
4712 fi
4713
4714 CLANG_COMPILER=no
4715
4716 if test "$GCC" = yes ; then
4717         echo "$as_me:4717: checking if this is really Clang C compiler" >&5
4718 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
4719         cf_save_CFLAGS="$CFLAGS"
4720         CFLAGS="$CFLAGS -Qunused-arguments"
4721         cat >conftest.$ac_ext <<_ACEOF
4722 #line 4722 "configure"
4723 #include "confdefs.h"
4724
4725 int
4726 main ()
4727 {
4728
4729 #ifdef __clang__
4730 #else
4731 make an error
4732 #endif
4733
4734   ;
4735   return 0;
4736 }
4737 _ACEOF
4738 rm -f conftest.$ac_objext
4739 if { (eval echo "$as_me:4739: \"$ac_compile\"") >&5
4740   (eval $ac_compile) 2>&5
4741   ac_status=$?
4742   echo "$as_me:4742: \$? = $ac_status" >&5
4743   (exit $ac_status); } &&
4744          { ac_try='test -s conftest.$ac_objext'
4745   { (eval echo "$as_me:4745: \"$ac_try\"") >&5
4746   (eval $ac_try) 2>&5
4747   ac_status=$?
4748   echo "$as_me:4748: \$? = $ac_status" >&5
4749   (exit $ac_status); }; }; then
4750   CLANG_COMPILER=yes
4751 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
4752
4753 else
4754   echo "$as_me: failed program was:" >&5
4755 cat conftest.$ac_ext >&5
4756 fi
4757 rm -f conftest.$ac_objext conftest.$ac_ext
4758         CFLAGS="$cf_save_CFLAGS"
4759         echo "$as_me:4759: result: $CLANG_COMPILER" >&5
4760 echo "${ECHO_T}$CLANG_COMPILER" >&6
4761 fi
4762
4763 cat > conftest.$ac_ext <<EOF
4764 #line 4764 "${as_me:-configure}"
4765 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4766 EOF
4767
4768 if test "$INTEL_COMPILER" = yes
4769 then
4770 # The "-wdXXX" options suppress warnings:
4771 # remark #1419: external declaration in primary source file
4772 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4773 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4774 # remark #193: zero used for undefined preprocessing identifier
4775 # remark #593: variable "curs_sb_left_arrow" was set but never used
4776 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4777 # remark #869: parameter "tw" was never referenced
4778 # remark #981: operands are evaluated in unspecified order
4779 # warning #279: controlling expression is constant
4780
4781         { echo "$as_me:4781: checking for $CC warning options..." >&5
4782 echo "$as_me: checking for $CC warning options..." >&6;}
4783         cf_save_CFLAGS="$CFLAGS"
4784         EXTRA_CFLAGS="-Wall"
4785         for cf_opt in \
4786                 wd1419 \
4787                 wd1683 \
4788                 wd1684 \
4789                 wd193 \
4790                 wd593 \
4791                 wd279 \
4792                 wd810 \
4793                 wd869 \
4794                 wd981
4795         do
4796                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4797                 if { (eval echo "$as_me:4797: \"$ac_compile\"") >&5
4798   (eval $ac_compile) 2>&5
4799   ac_status=$?
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); }; then
4802                         test -n "$verbose" && echo "$as_me:4802: result: ... -$cf_opt" >&5
4803 echo "${ECHO_T}... -$cf_opt" >&6
4804                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4805                 fi
4806         done
4807         CFLAGS="$cf_save_CFLAGS"
4808
4809 elif test "$GCC" = yes
4810 then
4811         { echo "$as_me:4811: checking for $CC warning options..." >&5
4812 echo "$as_me: checking for $CC warning options..." >&6;}
4813         cf_save_CFLAGS="$CFLAGS"
4814         EXTRA_CFLAGS=
4815         cf_warn_CONST=""
4816         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4817         for cf_opt in W Wall \
4818                 Wbad-function-cast \
4819                 Wcast-align \
4820                 Wcast-qual \
4821                 Winline \
4822                 Wmissing-declarations \
4823                 Wmissing-prototypes \
4824                 Wnested-externs \
4825                 Wpointer-arith \
4826                 Wshadow \
4827                 Wstrict-prototypes \
4828                 Wundef $cf_warn_CONST
4829         do
4830                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4831                 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832   (eval $ac_compile) 2>&5
4833   ac_status=$?
4834   echo "$as_me:4834: \$? = $ac_status" >&5
4835   (exit $ac_status); }; then
4836                         test -n "$verbose" && echo "$as_me:4836: result: ... -$cf_opt" >&5
4837 echo "${ECHO_T}... -$cf_opt" >&6
4838                         case $cf_opt in #(vi
4839                         Wcast-qual) #(vi
4840                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4841                                 ;;
4842                         Winline) #(vi
4843                                 case $GCC_VERSION in
4844                                 [34].*)
4845                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4846
4847 echo "${as_me:-configure}:4847: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4848
4849                                         continue;;
4850                                 esac
4851                                 ;;
4852                         Wpointer-arith) #(vi
4853                                 case $GCC_VERSION in
4854                                 [12].*)
4855                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4856
4857 echo "${as_me:-configure}:4857: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4858
4859                                         continue;;
4860                                 esac
4861                                 ;;
4862                         esac
4863                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4864                 fi
4865         done
4866         CFLAGS="$cf_save_CFLAGS"
4867 fi
4868 rm -rf conftest*
4869
4870 fi
4871 fi
4872
4873 echo "$as_me:4873: checking if you want to use pkg-config" >&5
4874 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4875
4876 # Check whether --with-pkg-config or --without-pkg-config was given.
4877 if test "${with_pkg_config+set}" = set; then
4878   withval="$with_pkg_config"
4879   cf_pkg_config=$withval
4880 else
4881   cf_pkg_config=yes
4882 fi;
4883 echo "$as_me:4883: result: $cf_pkg_config" >&5
4884 echo "${ECHO_T}$cf_pkg_config" >&6
4885
4886 case $cf_pkg_config in #(vi
4887 no) #(vi
4888         PKG_CONFIG=none
4889         ;;
4890 yes) #(vi
4891
4892 if test -n "$ac_tool_prefix"; then
4893   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4894 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4895 echo "$as_me:4895: checking for $ac_word" >&5
4896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4897 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4898   echo $ECHO_N "(cached) $ECHO_C" >&6
4899 else
4900   case $PKG_CONFIG in
4901   [\\/]* | ?:[\\/]*)
4902   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4903   ;;
4904   *)
4905   ac_save_IFS=$IFS; IFS=$ac_path_separator
4906 ac_dummy="$PATH"
4907 for ac_dir in $ac_dummy; do
4908   IFS=$ac_save_IFS
4909   test -z "$ac_dir" && ac_dir=.
4910   if $as_executable_p "$ac_dir/$ac_word"; then
4911    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4912    echo "$as_me:4912: found $ac_dir/$ac_word" >&5
4913    break
4914 fi
4915 done
4916
4917   ;;
4918 esac
4919 fi
4920 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4921
4922 if test -n "$PKG_CONFIG"; then
4923   echo "$as_me:4923: result: $PKG_CONFIG" >&5
4924 echo "${ECHO_T}$PKG_CONFIG" >&6
4925 else
4926   echo "$as_me:4926: result: no" >&5
4927 echo "${ECHO_T}no" >&6
4928 fi
4929
4930 fi
4931 if test -z "$ac_cv_path_PKG_CONFIG"; then
4932   ac_pt_PKG_CONFIG=$PKG_CONFIG
4933   # Extract the first word of "pkg-config", so it can be a program name with args.
4934 set dummy pkg-config; ac_word=$2
4935 echo "$as_me:4935: checking for $ac_word" >&5
4936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4937 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4938   echo $ECHO_N "(cached) $ECHO_C" >&6
4939 else
4940   case $ac_pt_PKG_CONFIG in
4941   [\\/]* | ?:[\\/]*)
4942   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4943   ;;
4944   *)
4945   ac_save_IFS=$IFS; IFS=$ac_path_separator
4946 ac_dummy="$PATH"
4947 for ac_dir in $ac_dummy; do
4948   IFS=$ac_save_IFS
4949   test -z "$ac_dir" && ac_dir=.
4950   if $as_executable_p "$ac_dir/$ac_word"; then
4951    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4952    echo "$as_me:4952: found $ac_dir/$ac_word" >&5
4953    break
4954 fi
4955 done
4956
4957   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4958   ;;
4959 esac
4960 fi
4961 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4962
4963 if test -n "$ac_pt_PKG_CONFIG"; then
4964   echo "$as_me:4964: result: $ac_pt_PKG_CONFIG" >&5
4965 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4966 else
4967   echo "$as_me:4967: result: no" >&5
4968 echo "${ECHO_T}no" >&6
4969 fi
4970
4971   PKG_CONFIG=$ac_pt_PKG_CONFIG
4972 else
4973   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4974 fi
4975
4976         ;;
4977 *)
4978         PKG_CONFIG=$withval
4979         ;;
4980 esac
4981
4982 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4983 if test "$PKG_CONFIG" != none ; then
4984
4985 if test "x$prefix" != xNONE; then
4986   cf_path_syntax="$prefix"
4987 else
4988   cf_path_syntax="$ac_default_prefix"
4989 fi
4990
4991 case ".$PKG_CONFIG" in #(vi
4992 .\$\(*\)*|.\'*\'*) #(vi
4993   ;;
4994 ..|./*|.\\*) #(vi
4995   ;;
4996 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4997   ;;
4998 .\${*prefix}*|.\${*dir}*) #(vi
4999   eval PKG_CONFIG="$PKG_CONFIG"
5000   case ".$PKG_CONFIG" in #(vi
5001   .NONE/*)
5002     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5003     ;;
5004   esac
5005   ;; #(vi
5006 .no|.NONE/*)
5007   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5008   ;;
5009 *)
5010   { { echo "$as_me:5010: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5011 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5012    { (exit 1); exit 1; }; }
5013   ;;
5014 esac
5015
5016 fi
5017
5018 echo "$as_me:5018: checking for this package's name" >&5
5019 echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
5020
5021 # Check whether --with-package or --without-package was given.
5022 if test "${with_package+set}" = set; then
5023   withval="$with_package"
5024   PACKAGE=$withval
5025 else
5026   PACKAGE=dialog
5027 fi;
5028 echo "$as_me:5028: result: $PACKAGE" >&5
5029 echo "${ECHO_T}$PACKAGE" >&6
5030
5031 if test -f $srcdir/VERSION ; then
5032         echo "$as_me:5032: checking for package version" >&5
5033 echo $ECHO_N "checking for package version... $ECHO_C" >&6
5034
5035         # if there are not enough fields, cut returns the last one...
5036         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5037         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
5038         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
5039
5040         # this is how CF_BUNDLED_INTL uses $VERSION:
5041         VERSION="$cf_field1"
5042
5043         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
5044         test -z "$VERSION_MAJOR" && { { echo "$as_me:5044: error: missing major-version" >&5
5045 echo "$as_me: error: missing major-version" >&2;}
5046    { (exit 1); exit 1; }; }
5047
5048         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
5049         test -z "$VERSION_MINOR" && { { echo "$as_me:5049: error: missing minor-version" >&5
5050 echo "$as_me: error: missing minor-version" >&2;}
5051    { (exit 1); exit 1; }; }
5052
5053         echo "$as_me:5053: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
5054 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
5055
5056         echo "$as_me:5056: checking for package patch date" >&5
5057 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
5058         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
5059         case .$VERSION_PATCH in
5060         .)
5061                 { { echo "$as_me:5061: error: missing patch-date $VERSION_PATCH" >&5
5062 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
5063    { (exit 1); exit 1; }; }
5064                 ;;
5065         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
5066                 ;;
5067         *)
5068                 { { echo "$as_me:5068: error: illegal patch-date $VERSION_PATCH" >&5
5069 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
5070    { (exit 1); exit 1; }; }
5071                 ;;
5072         esac
5073         echo "$as_me:5073: result: $VERSION_PATCH" >&5
5074 echo "${ECHO_T}$VERSION_PATCH" >&6
5075 else
5076         { { echo "$as_me:5076: error: did not find $srcdir/VERSION" >&5
5077 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
5078    { (exit 1); exit 1; }; }
5079 fi
5080
5081 # show the actual data that we have for versions:
5082 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
5083
5084 echo "${as_me:-configure}:5084: testing ABI VERSION $VERSION ..." 1>&5
5085
5086 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
5087
5088 echo "${as_me:-configure}:5088: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
5089
5090 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
5091
5092 echo "${as_me:-configure}:5092: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
5093
5094 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
5095
5096 echo "${as_me:-configure}:5096: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
5097
5098         cf_PACKAGE=dialog
5099         PACKAGE=$PACKAGE
5100
5101 cat >>confdefs.h <<EOF
5102 #define PACKAGE "$PACKAGE"
5103 EOF
5104
5105 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5106
5107         cat >>confdefs.h <<EOF
5108 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
5109 EOF
5110
5111         cat >>confdefs.h <<EOF
5112 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
5113 EOF
5114
5115 CFG_ROOTNAME=$PACKAGE
5116 HDR_ROOTNAME=$PACKAGE
5117 LIB_ROOTNAME=$PACKAGE
5118
5119 echo "$as_me:5119: checking if we should install dlg_XXX headers to subdirectory" >&5
5120 echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
5121
5122 # Check whether --enable-header-subdir or --disable-header-subdir was given.
5123 if test "${enable_header_subdir+set}" = set; then
5124   enableval="$enable_header_subdir"
5125   SUB_INC=$enableval
5126 else
5127   SUB_INC=no
5128 fi;
5129 echo "$as_me:5129: result: $SUB_INC" >&5
5130 echo "${ECHO_T}$SUB_INC" >&6
5131
5132 EXTRAOBJS=""
5133
5134 echo "$as_me:5134: checking for ANSI C header files" >&5
5135 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5136 if test "${ac_cv_header_stdc+set}" = set; then
5137   echo $ECHO_N "(cached) $ECHO_C" >&6
5138 else
5139   cat >conftest.$ac_ext <<_ACEOF
5140 #line 5140 "configure"
5141 #include "confdefs.h"
5142 #include <stdlib.h>
5143 #include <stdarg.h>
5144 #include <string.h>
5145 #include <float.h>
5146
5147 _ACEOF
5148 if { (eval echo "$as_me:5148: \"$ac_cpp conftest.$ac_ext\"") >&5
5149   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5150   ac_status=$?
5151   egrep -v '^ *\+' conftest.er1 >conftest.err
5152   rm -f conftest.er1
5153   cat conftest.err >&5
5154   echo "$as_me:5154: \$? = $ac_status" >&5
5155   (exit $ac_status); } >/dev/null; then
5156   if test -s conftest.err; then
5157     ac_cpp_err=$ac_c_preproc_warn_flag
5158   else
5159     ac_cpp_err=
5160   fi
5161 else
5162   ac_cpp_err=yes
5163 fi
5164 if test -z "$ac_cpp_err"; then
5165   ac_cv_header_stdc=yes
5166 else
5167   echo "$as_me: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   ac_cv_header_stdc=no
5170 fi
5171 rm -f conftest.err conftest.$ac_ext
5172
5173 if test $ac_cv_header_stdc = yes; then
5174   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5175   cat >conftest.$ac_ext <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5178 #include <string.h>
5179
5180 _ACEOF
5181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5182   egrep "memchr" >/dev/null 2>&1; then
5183   :
5184 else
5185   ac_cv_header_stdc=no
5186 fi
5187 rm -rf conftest*
5188
5189 fi
5190
5191 if test $ac_cv_header_stdc = yes; then
5192   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5193   cat >conftest.$ac_ext <<_ACEOF
5194 #line 5194 "configure"
5195 #include "confdefs.h"
5196 #include <stdlib.h>
5197
5198 _ACEOF
5199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5200   egrep "free" >/dev/null 2>&1; then
5201   :
5202 else
5203   ac_cv_header_stdc=no
5204 fi
5205 rm -rf conftest*
5206
5207 fi
5208
5209 if test $ac_cv_header_stdc = yes; then
5210   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5211   if test "$cross_compiling" = yes; then
5212   :
5213 else
5214   cat >conftest.$ac_ext <<_ACEOF
5215 #line 5215 "configure"
5216 #include "confdefs.h"
5217 #include <ctype.h>
5218 #if ((' ' & 0x0FF) == 0x020)
5219 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5220 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5221 #else
5222 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5223                      || ('j' <= (c) && (c) <= 'r') \
5224                      || ('s' <= (c) && (c) <= 'z'))
5225 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5226 #endif
5227
5228 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5229 int
5230 main ()
5231 {
5232   int i;
5233   for (i = 0; i < 256; i++)
5234     if (XOR (islower (i), ISLOWER (i))
5235         || toupper (i) != TOUPPER (i))
5236       $ac_main_return(2);
5237   $ac_main_return (0);
5238 }
5239 _ACEOF
5240 rm -f conftest$ac_exeext
5241 if { (eval echo "$as_me:5241: \"$ac_link\"") >&5
5242   (eval $ac_link) 2>&5
5243   ac_status=$?
5244   echo "$as_me:5244: \$? = $ac_status" >&5
5245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5246   { (eval echo "$as_me:5246: \"$ac_try\"") >&5
5247   (eval $ac_try) 2>&5
5248   ac_status=$?
5249   echo "$as_me:5249: \$? = $ac_status" >&5
5250   (exit $ac_status); }; }; then
5251   :
5252 else
5253   echo "$as_me: program exited with status $ac_status" >&5
5254 echo "$as_me: failed program was:" >&5
5255 cat conftest.$ac_ext >&5
5256 ac_cv_header_stdc=no
5257 fi
5258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5259 fi
5260 fi
5261 fi
5262 echo "$as_me:5262: result: $ac_cv_header_stdc" >&5
5263 echo "${ECHO_T}$ac_cv_header_stdc" >&6
5264 if test $ac_cv_header_stdc = yes; then
5265
5266 cat >>confdefs.h <<\EOF
5267 #define STDC_HEADERS 1
5268 EOF
5269
5270 fi
5271
5272 echo "$as_me:5272: checking for inline" >&5
5273 echo $ECHO_N "checking for inline... $ECHO_C" >&6
5274 if test "${ac_cv_c_inline+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   ac_cv_c_inline=no
5278 for ac_kw in inline __inline__ __inline; do
5279   cat >conftest.$ac_ext <<_ACEOF
5280 #line 5280 "configure"
5281 #include "confdefs.h"
5282 #ifndef __cplusplus
5283 static $ac_kw int static_foo () {return 0; }
5284 $ac_kw int foo () {return 0; }
5285 #endif
5286
5287 _ACEOF
5288 rm -f conftest.$ac_objext
5289 if { (eval echo "$as_me:5289: \"$ac_compile\"") >&5
5290   (eval $ac_compile) 2>&5
5291   ac_status=$?
5292   echo "$as_me:5292: \$? = $ac_status" >&5
5293   (exit $ac_status); } &&
5294          { ac_try='test -s conftest.$ac_objext'
5295   { (eval echo "$as_me:5295: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:5298: \$? = $ac_status" >&5
5299   (exit $ac_status); }; }; then
5300   ac_cv_c_inline=$ac_kw; break
5301 else
5302   echo "$as_me: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 fi
5305 rm -f conftest.$ac_objext conftest.$ac_ext
5306 done
5307
5308 fi
5309 echo "$as_me:5309: result: $ac_cv_c_inline" >&5
5310 echo "${ECHO_T}$ac_cv_c_inline" >&6
5311 case $ac_cv_c_inline in
5312   inline | yes) ;;
5313   no)
5314 cat >>confdefs.h <<\EOF
5315 #define inline
5316 EOF
5317  ;;
5318   *)  cat >>confdefs.h <<EOF
5319 #define inline $ac_cv_c_inline
5320 EOF
5321  ;;
5322 esac
5323
5324 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5325
5326 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5327                   inttypes.h stdint.h unistd.h
5328 do
5329 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5330 echo "$as_me:5330: checking for $ac_header" >&5
5331 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5332 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5333   echo $ECHO_N "(cached) $ECHO_C" >&6
5334 else
5335   cat >conftest.$ac_ext <<_ACEOF
5336 #line 5336 "configure"
5337 #include "confdefs.h"
5338 $ac_includes_default
5339 #include <$ac_header>
5340 _ACEOF
5341 rm -f conftest.$ac_objext
5342 if { (eval echo "$as_me:5342: \"$ac_compile\"") >&5
5343   (eval $ac_compile) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); } &&
5347          { ac_try='test -s conftest.$ac_objext'
5348   { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5349   (eval $ac_try) 2>&5
5350   ac_status=$?
5351   echo "$as_me:5351: \$? = $ac_status" >&5
5352   (exit $ac_status); }; }; then
5353   eval "$as_ac_Header=yes"
5354 else
5355   echo "$as_me: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 eval "$as_ac_Header=no"
5358 fi
5359 rm -f conftest.$ac_objext conftest.$ac_ext
5360 fi
5361 echo "$as_me:5361: result: `eval echo '${'$as_ac_Header'}'`" >&5
5362 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5363 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5364   cat >>confdefs.h <<EOF
5365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5366 EOF
5367
5368 fi
5369 done
5370
5371 echo "$as_me:5371: checking for off_t" >&5
5372 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5373 if test "${ac_cv_type_off_t+set}" = set; then
5374   echo $ECHO_N "(cached) $ECHO_C" >&6
5375 else
5376   cat >conftest.$ac_ext <<_ACEOF
5377 #line 5377 "configure"
5378 #include "confdefs.h"
5379 $ac_includes_default
5380 int
5381 main ()
5382 {
5383 if ((off_t *) 0)
5384   return 0;
5385 if (sizeof (off_t))
5386   return 0;
5387   ;
5388   return 0;
5389 }
5390 _ACEOF
5391 rm -f conftest.$ac_objext
5392 if { (eval echo "$as_me:5392: \"$ac_compile\"") >&5
5393   (eval $ac_compile) 2>&5
5394   ac_status=$?
5395   echo "$as_me:5395: \$? = $ac_status" >&5
5396   (exit $ac_status); } &&
5397          { ac_try='test -s conftest.$ac_objext'
5398   { (eval echo "$as_me:5398: \"$ac_try\"") >&5
5399   (eval $ac_try) 2>&5
5400   ac_status=$?
5401   echo "$as_me:5401: \$? = $ac_status" >&5
5402   (exit $ac_status); }; }; then
5403   ac_cv_type_off_t=yes
5404 else
5405   echo "$as_me: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
5407 ac_cv_type_off_t=no
5408 fi
5409 rm -f conftest.$ac_objext conftest.$ac_ext
5410 fi
5411 echo "$as_me:5411: result: $ac_cv_type_off_t" >&5
5412 echo "${ECHO_T}$ac_cv_type_off_t" >&6
5413 if test $ac_cv_type_off_t = yes; then
5414   :
5415 else
5416
5417 cat >>confdefs.h <<EOF
5418 #define off_t long
5419 EOF
5420
5421 fi
5422
5423 echo "$as_me:5423: checking for size_t" >&5
5424 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5425 if test "${ac_cv_type_size_t+set}" = set; then
5426   echo $ECHO_N "(cached) $ECHO_C" >&6
5427 else
5428   cat >conftest.$ac_ext <<_ACEOF
5429 #line 5429 "configure"
5430 #include "confdefs.h"
5431 $ac_includes_default
5432 int
5433 main ()
5434 {
5435 if ((size_t *) 0)
5436   return 0;
5437 if (sizeof (size_t))
5438   return 0;
5439   ;
5440   return 0;
5441 }
5442 _ACEOF
5443 rm -f conftest.$ac_objext
5444 if { (eval echo "$as_me:5444: \"$ac_compile\"") >&5
5445   (eval $ac_compile) 2>&5
5446   ac_status=$?
5447   echo "$as_me:5447: \$? = $ac_status" >&5
5448   (exit $ac_status); } &&
5449          { ac_try='test -s conftest.$ac_objext'
5450   { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:5453: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   ac_cv_type_size_t=yes
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 ac_cv_type_size_t=no
5460 fi
5461 rm -f conftest.$ac_objext conftest.$ac_ext
5462 fi
5463 echo "$as_me:5463: result: $ac_cv_type_size_t" >&5
5464 echo "${ECHO_T}$ac_cv_type_size_t" >&6
5465 if test $ac_cv_type_size_t = yes; then
5466   :
5467 else
5468
5469 cat >>confdefs.h <<EOF
5470 #define size_t unsigned
5471 EOF
5472
5473 fi
5474
5475 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5476 # for constant arguments.  Useless!
5477 echo "$as_me:5477: checking for working alloca.h" >&5
5478 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
5479 if test "${ac_cv_working_alloca_h+set}" = set; then
5480   echo $ECHO_N "(cached) $ECHO_C" >&6
5481 else
5482   cat >conftest.$ac_ext <<_ACEOF
5483 #line 5483 "configure"
5484 #include "confdefs.h"
5485 #include <alloca.h>
5486 int
5487 main ()
5488 {
5489 char *p = (char *) alloca (2 * sizeof (int));
5490   ;
5491   return 0;
5492 }
5493 _ACEOF
5494 rm -f conftest.$ac_objext conftest$ac_exeext
5495 if { (eval echo "$as_me:5495: \"$ac_link\"") >&5
5496   (eval $ac_link) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); } &&
5500          { ac_try='test -s conftest$ac_exeext'
5501   { (eval echo "$as_me:5501: \"$ac_try\"") >&5
5502   (eval $ac_try) 2>&5
5503   ac_status=$?
5504   echo "$as_me:5504: \$? = $ac_status" >&5
5505   (exit $ac_status); }; }; then
5506   ac_cv_working_alloca_h=yes
5507 else
5508   echo "$as_me: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5510 ac_cv_working_alloca_h=no
5511 fi
5512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5513 fi
5514 echo "$as_me:5514: result: $ac_cv_working_alloca_h" >&5
5515 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
5516 if test $ac_cv_working_alloca_h = yes; then
5517
5518 cat >>confdefs.h <<\EOF
5519 #define HAVE_ALLOCA_H 1
5520 EOF
5521
5522 fi
5523
5524 echo "$as_me:5524: checking for alloca" >&5
5525 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
5526 if test "${ac_cv_func_alloca_works+set}" = set; then
5527   echo $ECHO_N "(cached) $ECHO_C" >&6
5528 else
5529   cat >conftest.$ac_ext <<_ACEOF
5530 #line 5530 "configure"
5531 #include "confdefs.h"
5532 #ifdef __GNUC__
5533 # define alloca __builtin_alloca
5534 #else
5535 # ifdef _MSC_VER
5536 #  include <malloc.h>
5537 #  define alloca _alloca
5538 # else
5539 #  if HAVE_ALLOCA_H
5540 #   include <alloca.h>
5541 #  else
5542 #   ifdef _AIX
5543  #pragma alloca
5544 #   else
5545 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5546 char *alloca ();
5547 #    endif
5548 #   endif
5549 #  endif
5550 # endif
5551 #endif
5552
5553 int
5554 main ()
5555 {
5556 char *p = (char *) alloca (1);
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 rm -f conftest.$ac_objext conftest$ac_exeext
5562 if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
5563   (eval $ac_link) 2>&5
5564   ac_status=$?
5565   echo "$as_me:5565: \$? = $ac_status" >&5
5566   (exit $ac_status); } &&
5567          { ac_try='test -s conftest$ac_exeext'
5568   { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5569   (eval $ac_try) 2>&5
5570   ac_status=$?
5571   echo "$as_me:5571: \$? = $ac_status" >&5
5572   (exit $ac_status); }; }; then
5573   ac_cv_func_alloca_works=yes
5574 else
5575   echo "$as_me: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 ac_cv_func_alloca_works=no
5578 fi
5579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5580 fi
5581 echo "$as_me:5581: result: $ac_cv_func_alloca_works" >&5
5582 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
5583
5584 if test $ac_cv_func_alloca_works = yes; then
5585
5586 cat >>confdefs.h <<\EOF
5587 #define HAVE_ALLOCA 1
5588 EOF
5589
5590 else
5591   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5592 # that cause trouble.  Some versions do not even contain alloca or
5593 # contain a buggy version.  If you still want to use their alloca,
5594 # use ar to extract alloca.o from them instead of compiling alloca.c.
5595
5596 ALLOCA=alloca.$ac_objext
5597
5598 cat >>confdefs.h <<\EOF
5599 #define C_ALLOCA 1
5600 EOF
5601
5602 echo "$as_me:5602: checking whether \`alloca.c' needs Cray hooks" >&5
5603 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
5604 if test "${ac_cv_os_cray+set}" = set; then
5605   echo $ECHO_N "(cached) $ECHO_C" >&6
5606 else
5607   cat >conftest.$ac_ext <<_ACEOF
5608 #line 5608 "configure"
5609 #include "confdefs.h"
5610 #if defined(CRAY) && ! defined(CRAY2)
5611 webecray
5612 #else
5613 wenotbecray
5614 #endif
5615
5616 _ACEOF
5617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5618   egrep "webecray" >/dev/null 2>&1; then
5619   ac_cv_os_cray=yes
5620 else
5621   ac_cv_os_cray=no
5622 fi
5623 rm -rf conftest*
5624
5625 fi
5626 echo "$as_me:5626: result: $ac_cv_os_cray" >&5
5627 echo "${ECHO_T}$ac_cv_os_cray" >&6
5628 if test $ac_cv_os_cray = yes; then
5629   for ac_func in _getb67 GETB67 getb67; do
5630     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5631 echo "$as_me:5631: checking for $ac_func" >&5
5632 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5633 if eval "test \"\${$as_ac_var+set}\" = set"; then
5634   echo $ECHO_N "(cached) $ECHO_C" >&6
5635 else
5636   cat >conftest.$ac_ext <<_ACEOF
5637 #line 5637 "configure"
5638 #include "confdefs.h"
5639 /* System header to define __stub macros and hopefully few prototypes,
5640     which can conflict with char $ac_func (); below.  */
5641 #include <assert.h>
5642 /* Override any gcc2 internal prototype to avoid an error.  */
5643 #ifdef __cplusplus
5644 extern "C"
5645 #endif
5646 /* We use char because int might match the return type of a gcc2
5647    builtin and then its argument prototype would still apply.  */
5648 char $ac_func ();
5649 char (*f) ();
5650
5651 int
5652 main ()
5653 {
5654 /* The GNU C library defines this for functions which it implements
5655     to always fail with ENOSYS.  Some functions are actually named
5656     something starting with __ and the normal name is an alias.  */
5657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658 choke me
5659 #else
5660 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5661 #endif
5662
5663   ;
5664   return 0;
5665 }
5666 _ACEOF
5667 rm -f conftest.$ac_objext conftest$ac_exeext
5668 if { (eval echo "$as_me:5668: \"$ac_link\"") >&5
5669   (eval $ac_link) 2>&5
5670   ac_status=$?
5671   echo "$as_me:5671: \$? = $ac_status" >&5
5672   (exit $ac_status); } &&
5673          { ac_try='test -s conftest$ac_exeext'
5674   { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5675   (eval $ac_try) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); }; }; then
5679   eval "$as_ac_var=yes"
5680 else
5681   echo "$as_me: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 eval "$as_ac_var=no"
5684 fi
5685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5686 fi
5687 echo "$as_me:5687: result: `eval echo '${'$as_ac_var'}'`" >&5
5688 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5689 if test `eval echo '${'$as_ac_var'}'` = yes; then
5690
5691 cat >>confdefs.h <<EOF
5692 #define CRAY_STACKSEG_END $ac_func
5693 EOF
5694
5695     break
5696 fi
5697
5698   done
5699 fi
5700
5701 echo "$as_me:5701: checking stack direction for C alloca" >&5
5702 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5703 if test "${ac_cv_c_stack_direction+set}" = set; then
5704   echo $ECHO_N "(cached) $ECHO_C" >&6
5705 else
5706   if test "$cross_compiling" = yes; then
5707   ac_cv_c_stack_direction=0
5708 else
5709   cat >conftest.$ac_ext <<_ACEOF
5710 #line 5710 "configure"
5711 #include "confdefs.h"
5712 int
5713 find_stack_direction ()
5714 {
5715   static char *addr = 0;
5716   auto char dummy;
5717   if (addr == 0)
5718     {
5719       addr = &dummy;
5720       return find_stack_direction ();
5721     }
5722   else
5723     return (&dummy > addr) ? 1 : -1;
5724 }
5725
5726 int
5727 main ()
5728 {
5729   $ac_main_return (find_stack_direction () < 0);
5730 }
5731 _ACEOF
5732 rm -f conftest$ac_exeext
5733 if { (eval echo "$as_me:5733: \"$ac_link\"") >&5
5734   (eval $ac_link) 2>&5
5735   ac_status=$?
5736   echo "$as_me:5736: \$? = $ac_status" >&5
5737   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5738   { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5739   (eval $ac_try) 2>&5
5740   ac_status=$?
5741   echo "$as_me:5741: \$? = $ac_status" >&5
5742   (exit $ac_status); }; }; then
5743   ac_cv_c_stack_direction=1
5744 else
5745   echo "$as_me: program exited with status $ac_status" >&5
5746 echo "$as_me: failed program was:" >&5
5747 cat conftest.$ac_ext >&5
5748 ac_cv_c_stack_direction=-1
5749 fi
5750 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5751 fi
5752 fi
5753 echo "$as_me:5753: result: $ac_cv_c_stack_direction" >&5
5754 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
5755
5756 cat >>confdefs.h <<EOF
5757 #define STACK_DIRECTION $ac_cv_c_stack_direction
5758 EOF
5759
5760 fi
5761
5762 for ac_header in stdlib.h unistd.h
5763 do
5764 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5765 echo "$as_me:5765: checking for $ac_header" >&5
5766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5768   echo $ECHO_N "(cached) $ECHO_C" >&6
5769 else
5770   cat >conftest.$ac_ext <<_ACEOF
5771 #line 5771 "configure"
5772 #include "confdefs.h"
5773 #include <$ac_header>
5774 _ACEOF
5775 if { (eval echo "$as_me:5775: \"$ac_cpp conftest.$ac_ext\"") >&5
5776   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5777   ac_status=$?
5778   egrep -v '^ *\+' conftest.er1 >conftest.err
5779   rm -f conftest.er1
5780   cat conftest.err >&5
5781   echo "$as_me:5781: \$? = $ac_status" >&5
5782   (exit $ac_status); } >/dev/null; then
5783   if test -s conftest.err; then
5784     ac_cpp_err=$ac_c_preproc_warn_flag
5785   else
5786     ac_cpp_err=
5787   fi
5788 else
5789   ac_cpp_err=yes
5790 fi
5791 if test -z "$ac_cpp_err"; then
5792   eval "$as_ac_Header=yes"
5793 else
5794   echo "$as_me: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   eval "$as_ac_Header=no"
5797 fi
5798 rm -f conftest.err conftest.$ac_ext
5799 fi
5800 echo "$as_me:5800: result: `eval echo '${'$as_ac_Header'}'`" >&5
5801 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5802 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5803   cat >>confdefs.h <<EOF
5804 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5805 EOF
5806
5807 fi
5808 done
5809
5810 for ac_func in getpagesize
5811 do
5812 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5813 echo "$as_me:5813: checking for $ac_func" >&5
5814 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5815 if eval "test \"\${$as_ac_var+set}\" = set"; then
5816   echo $ECHO_N "(cached) $ECHO_C" >&6
5817 else
5818   cat >conftest.$ac_ext <<_ACEOF
5819 #line 5819 "configure"
5820 #include "confdefs.h"
5821 /* System header to define __stub macros and hopefully few prototypes,
5822     which can conflict with char $ac_func (); below.  */
5823 #include <assert.h>
5824 /* Override any gcc2 internal prototype to avoid an error.  */
5825 #ifdef __cplusplus
5826 extern "C"
5827 #endif
5828 /* We use char because int might match the return type of a gcc2
5829    builtin and then its argument prototype would still apply.  */
5830 char $ac_func ();
5831 char (*f) ();
5832
5833 int
5834 main ()
5835 {
5836 /* The GNU C library defines this for functions which it implements
5837     to always fail with ENOSYS.  Some functions are actually named
5838     something starting with __ and the normal name is an alias.  */
5839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5840 choke me
5841 #else
5842 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5843 #endif
5844
5845   ;
5846   return 0;
5847 }
5848 _ACEOF
5849 rm -f conftest.$ac_objext conftest$ac_exeext
5850 if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
5851   (eval $ac_link) 2>&5
5852   ac_status=$?
5853   echo "$as_me:5853: \$? = $ac_status" >&5
5854   (exit $ac_status); } &&
5855          { ac_try='test -s conftest$ac_exeext'
5856   { (eval echo "$as_me:5856: \"$ac_try\"") >&5
5857   (eval $ac_try) 2>&5
5858   ac_status=$?
5859   echo "$as_me:5859: \$? = $ac_status" >&5
5860   (exit $ac_status); }; }; then
5861   eval "$as_ac_var=yes"
5862 else
5863   echo "$as_me: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5865 eval "$as_ac_var=no"
5866 fi
5867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5868 fi
5869 echo "$as_me:5869: result: `eval echo '${'$as_ac_var'}'`" >&5
5870 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5871 if test `eval echo '${'$as_ac_var'}'` = yes; then
5872   cat >>confdefs.h <<EOF
5873 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5874 EOF
5875
5876 fi
5877 done
5878
5879 echo "$as_me:5879: checking for working mmap" >&5
5880 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5881 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5882   echo $ECHO_N "(cached) $ECHO_C" >&6
5883 else
5884   if test "$cross_compiling" = yes; then
5885   ac_cv_func_mmap_fixed_mapped=no
5886 else
5887   cat >conftest.$ac_ext <<_ACEOF
5888 #line 5888 "configure"
5889 #include "confdefs.h"
5890 $ac_includes_default
5891 /* Thanks to Mike Haertel and Jim Avera for this test.
5892    Here is a matrix of mmap possibilities:
5893         mmap private not fixed
5894         mmap private fixed at somewhere currently unmapped
5895         mmap private fixed at somewhere already mapped
5896         mmap shared not fixed
5897         mmap shared fixed at somewhere currently unmapped
5898         mmap shared fixed at somewhere already mapped
5899    For private mappings, we should verify that changes cannot be read()
5900    back from the file, nor mmap's back from the file at a different
5901    address.  (There have been systems where private was not correctly
5902    implemented like the infamous i386 svr4.0, and systems where the
5903    VM page cache was not coherent with the file system buffer cache
5904    like early versions of FreeBSD and possibly contemporary NetBSD.)
5905    For shared mappings, we should conversely verify that changes get
5906    propogated back to all the places they're supposed to be.
5907
5908    Grep wants private fixed already mapped.
5909    The main things grep needs to know about mmap are:
5910    * does it exist and is it safe to write into the mmap'd area
5911    * how to use it (BSD variants)  */
5912
5913 #include <fcntl.h>
5914 #include <sys/mman.h>
5915
5916 #if !STDC_HEADERS && !HAVE_STDLIB_H
5917 char *malloc ();
5918 #endif
5919
5920 /* This mess was copied from the GNU getpagesize.h.  */
5921 #if !HAVE_GETPAGESIZE
5922 /* Assume that all systems that can run configure have sys/param.h.  */
5923 # if !HAVE_SYS_PARAM_H
5924 #  define HAVE_SYS_PARAM_H 1
5925 # endif
5926
5927 # ifdef _SC_PAGESIZE
5928 #  define getpagesize() sysconf(_SC_PAGESIZE)
5929 # else /* no _SC_PAGESIZE */
5930 #  if HAVE_SYS_PARAM_H
5931 #   include <sys/param.h>
5932 #   ifdef EXEC_PAGESIZE
5933 #    define getpagesize() EXEC_PAGESIZE
5934 #   else /* no EXEC_PAGESIZE */
5935 #    ifdef NBPG
5936 #     define getpagesize() NBPG * CLSIZE
5937 #     ifndef CLSIZE
5938 #      define CLSIZE 1
5939 #     endif /* no CLSIZE */
5940 #    else /* no NBPG */
5941 #     ifdef NBPC
5942 #      define getpagesize() NBPC
5943 #     else /* no NBPC */
5944 #      ifdef PAGESIZE
5945 #       define getpagesize() PAGESIZE
5946 #      endif /* PAGESIZE */
5947 #     endif /* no NBPC */
5948 #    endif /* no NBPG */
5949 #   endif /* no EXEC_PAGESIZE */
5950 #  else /* no HAVE_SYS_PARAM_H */
5951 #   define getpagesize() 8192   /* punt totally */
5952 #  endif /* no HAVE_SYS_PARAM_H */
5953 # endif /* no _SC_PAGESIZE */
5954
5955 #endif /* no HAVE_GETPAGESIZE */
5956
5957 int
5958 main ()
5959 {
5960   char *data, *data2, *data3;
5961   int i, pagesize;
5962   int fd;
5963
5964   pagesize = getpagesize ();
5965
5966   /* First, make a file with some known garbage in it. */
5967   data = (char *) malloc (pagesize);
5968   if (!data)
5969     $ac_main_return (1);
5970   for (i = 0; i < pagesize; ++i)
5971     *(data + i) = rand ();
5972   umask (0);
5973   fd = creat ("conftest.mmap", 0600);
5974   if (fd < 0)
5975     $ac_main_return (1);
5976   if (write (fd, data, pagesize) != pagesize)
5977     $ac_main_return (1);
5978   close (fd);
5979
5980   /* Next, try to mmap the file at a fixed address which already has
5981      something else allocated at it.  If we can, also make sure that
5982      we see the same garbage.  */
5983   fd = open ("conftest.mmap", O_RDWR);
5984   if (fd < 0)
5985     $ac_main_return (1);
5986   data2 = (char *) malloc (2 * pagesize);
5987   if (!data2)
5988     $ac_main_return (1);
5989   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5990   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5991                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
5992     $ac_main_return (1);
5993   for (i = 0; i < pagesize; ++i)
5994     if (*(data + i) != *(data2 + i))
5995       $ac_main_return (1);
5996
5997   /* Finally, make sure that changes to the mapped area do not
5998      percolate back to the file as seen by read().  (This is a bug on
5999      some variants of i386 svr4.0.)  */
6000   for (i = 0; i < pagesize; ++i)
6001     *(data2 + i) = *(data2 + i) + 1;
6002   data3 = (char *) malloc (pagesize);
6003   if (!data3)
6004     $ac_main_return (1);
6005   if (read (fd, data3, pagesize) != pagesize)
6006     $ac_main_return (1);
6007   for (i = 0; i < pagesize; ++i)
6008     if (*(data + i) != *(data3 + i))
6009       $ac_main_return (1);
6010   close (fd);
6011   $ac_main_return (0);
6012 }
6013 _ACEOF
6014 rm -f conftest$ac_exeext
6015 if { (eval echo "$as_me:6015: \"$ac_link\"") >&5
6016   (eval $ac_link) 2>&5
6017   ac_status=$?
6018   echo "$as_me:6018: \$? = $ac_status" >&5
6019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6020   { (eval echo "$as_me:6020: \"$ac_try\"") >&5
6021   (eval $ac_try) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit $ac_status); }; }; then
6025   ac_cv_func_mmap_fixed_mapped=yes
6026 else
6027   echo "$as_me: program exited with status $ac_status" >&5
6028 echo "$as_me: failed program was:" >&5
6029 cat conftest.$ac_ext >&5
6030 ac_cv_func_mmap_fixed_mapped=no
6031 fi
6032 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6033 fi
6034 fi
6035 echo "$as_me:6035: result: $ac_cv_func_mmap_fixed_mapped" >&5
6036 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6037 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6038
6039 cat >>confdefs.h <<\EOF
6040 #define HAVE_MMAP 1
6041 EOF
6042
6043 fi
6044 rm -f conftest.mmap
6045
6046     echo "$as_me:6046: checking whether we are using the GNU C Library 2.1 or newer" >&5
6047 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
6048 if test "${ac_cv_gnu_library_2_1+set}" = set; then
6049   echo $ECHO_N "(cached) $ECHO_C" >&6
6050 else
6051   cat >conftest.$ac_ext <<_ACEOF
6052 #line 6052 "configure"
6053 #include "confdefs.h"
6054
6055 #include <features.h>
6056 #ifdef __GNU_LIBRARY__
6057  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6058   Lucky GNU user
6059  #endif
6060 #endif
6061
6062 _ACEOF
6063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6064   egrep "Lucky GNU user" >/dev/null 2>&1; then
6065   ac_cv_gnu_library_2_1=yes
6066 else
6067   ac_cv_gnu_library_2_1=no
6068 fi
6069 rm -rf conftest*
6070
6071 fi
6072 echo "$as_me:6072: result: $ac_cv_gnu_library_2_1" >&5
6073 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
6074
6075     GLIBC21="$ac_cv_gnu_library_2_1"
6076
6077 cf_makefile=makefile
6078
6079 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
6080
6081 # Allow override of "config.h" definition:
6082 : ${CONFIG_H:=config.h}
6083
6084 if test -z "$PACKAGE" ; then
6085         { { echo "$as_me:6085: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
6086 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
6087    { (exit 1); exit 1; }; }
6088 fi
6089
6090 if test -z "$VERSION" ; then
6091 if test -f $srcdir/VERSION ; then
6092         VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
6093 else
6094         VERSION=unknown
6095 fi
6096 fi
6097
6098 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6099 stdlib.h string.h unistd.h sys/param.h
6100 do
6101 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6102 echo "$as_me:6102: checking for $ac_header" >&5
6103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6105   echo $ECHO_N "(cached) $ECHO_C" >&6
6106 else
6107   cat >conftest.$ac_ext <<_ACEOF
6108 #line 6108 "configure"
6109 #include "confdefs.h"
6110 #include <$ac_header>
6111 _ACEOF
6112 if { (eval echo "$as_me:6112: \"$ac_cpp conftest.$ac_ext\"") >&5
6113   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6114   ac_status=$?
6115   egrep -v '^ *\+' conftest.er1 >conftest.err
6116   rm -f conftest.er1
6117   cat conftest.err >&5
6118   echo "$as_me:6118: \$? = $ac_status" >&5
6119   (exit $ac_status); } >/dev/null; then
6120   if test -s conftest.err; then
6121     ac_cpp_err=$ac_c_preproc_warn_flag
6122   else
6123     ac_cpp_err=
6124   fi
6125 else
6126   ac_cpp_err=yes
6127 fi
6128 if test -z "$ac_cpp_err"; then
6129   eval "$as_ac_Header=yes"
6130 else
6131   echo "$as_me: failed program was:" >&5
6132   cat conftest.$ac_ext >&5
6133   eval "$as_ac_Header=no"
6134 fi
6135 rm -f conftest.err conftest.$ac_ext
6136 fi
6137 echo "$as_me:6137: result: `eval echo '${'$as_ac_Header'}'`" >&5
6138 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6139 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6140   cat >>confdefs.h <<EOF
6141 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6142 EOF
6143
6144 fi
6145 done
6146
6147 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6148 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6149 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6150 do
6151 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6152 echo "$as_me:6152: checking for $ac_func" >&5
6153 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6154 if eval "test \"\${$as_ac_var+set}\" = set"; then
6155   echo $ECHO_N "(cached) $ECHO_C" >&6
6156 else
6157   cat >conftest.$ac_ext <<_ACEOF
6158 #line 6158 "configure"
6159 #include "confdefs.h"
6160 /* System header to define __stub macros and hopefully few prototypes,
6161     which can conflict with char $ac_func (); below.  */
6162 #include <assert.h>
6163 /* Override any gcc2 internal prototype to avoid an error.  */
6164 #ifdef __cplusplus
6165 extern "C"
6166 #endif
6167 /* We use char because int might match the return type of a gcc2
6168    builtin and then its argument prototype would still apply.  */
6169 char $ac_func ();
6170 char (*f) ();
6171
6172 int
6173 main ()
6174 {
6175 /* The GNU C library defines this for functions which it implements
6176     to always fail with ENOSYS.  Some functions are actually named
6177     something starting with __ and the normal name is an alias.  */
6178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6179 choke me
6180 #else
6181 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6182 #endif
6183
6184   ;
6185   return 0;
6186 }
6187 _ACEOF
6188 rm -f conftest.$ac_objext conftest$ac_exeext
6189 if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
6190   (eval $ac_link) 2>&5
6191   ac_status=$?
6192   echo "$as_me:6192: \$? = $ac_status" >&5
6193   (exit $ac_status); } &&
6194          { ac_try='test -s conftest$ac_exeext'
6195   { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196   (eval $ac_try) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); }; }; then
6200   eval "$as_ac_var=yes"
6201 else
6202   echo "$as_me: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6204 eval "$as_ac_var=no"
6205 fi
6206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6207 fi
6208 echo "$as_me:6208: result: `eval echo '${'$as_ac_var'}'`" >&5
6209 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6210 if test `eval echo '${'$as_ac_var'}'` = yes; then
6211   cat >>confdefs.h <<EOF
6212 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6213 EOF
6214
6215 fi
6216 done
6217
6218 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6219 if test "${with_libiconv_prefix+set}" = set; then
6220   withval="$with_libiconv_prefix"
6221
6222   case "$withval" in #(vi
6223   no) #(vi
6224       ;;
6225   yes) #(vi
6226       ;;
6227   *)
6228
6229 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
6230         if test -d $cf_searchpath/include; then
6231
6232 if test -n "$cf_searchpath/include" ; then
6233   for cf_add_incdir in $cf_searchpath/include
6234   do
6235         while test $cf_add_incdir != /usr/include
6236         do
6237           if test -d $cf_add_incdir
6238           then
6239                 cf_have_incdir=no
6240                 if test -n "$CFLAGS$CPPFLAGS" ; then
6241                   # a loop is needed to ensure we can add subdirs of existing dirs
6242                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6243                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6244                           cf_have_incdir=yes; break
6245                         fi
6246                   done
6247                 fi
6248
6249                 if test "$cf_have_incdir" = no ; then
6250                   if test "$cf_add_incdir" = /usr/local/include ; then
6251                         if test "$GCC" = yes
6252                         then
6253                           cf_save_CPPFLAGS=$CPPFLAGS
6254                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6255                           cat >conftest.$ac_ext <<_ACEOF
6256 #line 6256 "configure"
6257 #include "confdefs.h"
6258 #include <stdio.h>
6259 int
6260 main ()
6261 {
6262 printf("Hello")
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 rm -f conftest.$ac_objext
6268 if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269   (eval $ac_compile) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit $ac_status); } &&
6273          { ac_try='test -s conftest.$ac_objext'
6274   { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275   (eval $ac_try) 2>&5
6276   ac_status=$?
6277   echo "$as_me:6277: \$? = $ac_status" >&5
6278   (exit $ac_status); }; }; then
6279   :
6280 else
6281   echo "$as_me: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6283 cf_have_incdir=yes
6284 fi
6285 rm -f conftest.$ac_objext conftest.$ac_ext
6286                           CPPFLAGS=$cf_save_CPPFLAGS
6287                         fi
6288                   fi
6289                 fi
6290
6291                 if test "$cf_have_incdir" = no ; then
6292                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing adding $cf_add_incdir to include-path ..." 1>&5
6295
6296                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6297
6298                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6299                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6300                   cf_add_incdir="$cf_top_incdir"
6301                 else
6302                   break
6303                 fi
6304           fi
6305         done
6306   done
6307 fi
6308
6309         elif test -d $cf_searchpath/../include ; then
6310
6311 if test -n "$cf_searchpath/../include" ; then
6312   for cf_add_incdir in $cf_searchpath/../include
6313   do
6314         while test $cf_add_incdir != /usr/include
6315         do
6316           if test -d $cf_add_incdir
6317           then
6318                 cf_have_incdir=no
6319                 if test -n "$CFLAGS$CPPFLAGS" ; then
6320                   # a loop is needed to ensure we can add subdirs of existing dirs
6321                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6322                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6323                           cf_have_incdir=yes; break
6324                         fi
6325                   done
6326                 fi
6327
6328                 if test "$cf_have_incdir" = no ; then
6329                   if test "$cf_add_incdir" = /usr/local/include ; then
6330                         if test "$GCC" = yes
6331                         then
6332                           cf_save_CPPFLAGS=$CPPFLAGS
6333                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6334                           cat >conftest.$ac_ext <<_ACEOF
6335 #line 6335 "configure"
6336 #include "confdefs.h"
6337 #include <stdio.h>
6338 int
6339 main ()
6340 {
6341 printf("Hello")
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 rm -f conftest.$ac_objext
6347 if { (eval echo "$as_me:6347: \"$ac_compile\"") >&5
6348   (eval $ac_compile) 2>&5
6349   ac_status=$?
6350   echo "$as_me:6350: \$? = $ac_status" >&5
6351   (exit $ac_status); } &&
6352          { ac_try='test -s conftest.$ac_objext'
6353   { (eval echo "$as_me:6353: \"$ac_try\"") >&5
6354   (eval $ac_try) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); }; }; then
6358   :
6359 else
6360   echo "$as_me: failed program was:" >&5
6361 cat conftest.$ac_ext >&5
6362 cf_have_incdir=yes
6363 fi
6364 rm -f conftest.$ac_objext conftest.$ac_ext
6365                           CPPFLAGS=$cf_save_CPPFLAGS
6366                         fi
6367                   fi
6368                 fi
6369
6370                 if test "$cf_have_incdir" = no ; then
6371                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6372
6373 echo "${as_me:-configure}:6373: testing adding $cf_add_incdir to include-path ..." 1>&5
6374
6375                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6376
6377                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6378                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6379                   cf_add_incdir="$cf_top_incdir"
6380                 else
6381                   break
6382                 fi
6383           fi
6384         done
6385   done
6386 fi
6387
6388         else
6389 { { echo "$as_me:6389: error: cannot find libiconv under $withval" >&5
6390 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6391    { (exit 1); exit 1; }; }
6392         fi
6393         if test -d $cf_searchpath/lib; then
6394
6395 if test -n "$cf_searchpath/lib" ; then
6396   for cf_add_libdir in $cf_searchpath/lib
6397   do
6398     if test $cf_add_libdir = /usr/lib ; then
6399       :
6400     elif test -d $cf_add_libdir
6401     then
6402       cf_have_libdir=no
6403       if test -n "$LDFLAGS$LIBS" ; then
6404         # a loop is needed to ensure we can add subdirs of existing dirs
6405         for cf_test_libdir in $LDFLAGS $LIBS ; do
6406           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6407             cf_have_libdir=yes; break
6408           fi
6409         done
6410       fi
6411       if test "$cf_have_libdir" = no ; then
6412         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6413
6414 echo "${as_me:-configure}:6414: testing adding $cf_add_libdir to library-path ..." 1>&5
6415
6416         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6417       fi
6418     fi
6419   done
6420 fi
6421
6422         elif test -d $cf_searchpath ; then
6423
6424 if test -n "$cf_searchpath" ; then
6425   for cf_add_libdir in $cf_searchpath
6426   do
6427     if test $cf_add_libdir = /usr/lib ; then
6428       :
6429     elif test -d $cf_add_libdir
6430     then
6431       cf_have_libdir=no
6432       if test -n "$LDFLAGS$LIBS" ; then
6433         # a loop is needed to ensure we can add subdirs of existing dirs
6434         for cf_test_libdir in $LDFLAGS $LIBS ; do
6435           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6436             cf_have_libdir=yes; break
6437           fi
6438         done
6439       fi
6440       if test "$cf_have_libdir" = no ; then
6441         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6442
6443 echo "${as_me:-configure}:6443: testing adding $cf_add_libdir to library-path ..." 1>&5
6444
6445         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6446       fi
6447     fi
6448   done
6449 fi
6450
6451         else
6452 { { echo "$as_me:6452: error: cannot find libiconv under $withval" >&5
6453 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6454    { (exit 1); exit 1; }; }
6455         fi
6456 done
6457
6458       ;;
6459   esac
6460
6461 fi;
6462
6463   echo "$as_me:6463: checking for iconv" >&5
6464 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
6465 if test "${am_cv_func_iconv+set}" = set; then
6466   echo $ECHO_N "(cached) $ECHO_C" >&6
6467 else
6468
6469 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6470 # will be set on completion of the AC_TRY_LINK below.
6471 cf_cv_header_path_iconv=
6472 cf_cv_library_path_iconv=
6473
6474 echo "${as_me:-configure}:6474: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
6475
6476 cf_save_LIBS="$LIBS"
6477
6478 cat >conftest.$ac_ext <<_ACEOF
6479 #line 6479 "configure"
6480 #include "confdefs.h"
6481
6482 #include <stdlib.h>
6483 #include <iconv.h>
6484
6485 int
6486 main ()
6487 {
6488
6489         iconv_t cd = iconv_open("","");
6490         iconv(cd,NULL,NULL,NULL,NULL);
6491         iconv_close(cd);
6492
6493   ;
6494   return 0;
6495 }
6496 _ACEOF
6497 rm -f conftest.$ac_objext conftest$ac_exeext
6498 if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
6499   (eval $ac_link) 2>&5
6500   ac_status=$?
6501   echo "$as_me:6501: \$? = $ac_status" >&5
6502   (exit $ac_status); } &&
6503          { ac_try='test -s conftest$ac_exeext'
6504   { (eval echo "$as_me:6504: \"$ac_try\"") >&5
6505   (eval $ac_try) 2>&5
6506   ac_status=$?
6507   echo "$as_me:6507: \$? = $ac_status" >&5
6508   (exit $ac_status); }; }; then
6509
6510         cf_cv_find_linkage_iconv=yes
6511         cf_cv_header_path_iconv=/usr/include
6512         cf_cv_library_path_iconv=/usr/lib
6513
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 cat conftest.$ac_ext >&5
6517
6518 LIBS="-liconv  $cf_save_LIBS"
6519
6520 cat >conftest.$ac_ext <<_ACEOF
6521 #line 6521 "configure"
6522 #include "confdefs.h"
6523
6524 #include <stdlib.h>
6525 #include <iconv.h>
6526
6527 int
6528 main ()
6529 {
6530
6531         iconv_t cd = iconv_open("","");
6532         iconv(cd,NULL,NULL,NULL,NULL);
6533         iconv_close(cd);
6534
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext conftest$ac_exeext
6540 if { (eval echo "$as_me:6540: \"$ac_link\"") >&5
6541   (eval $ac_link) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest$ac_exeext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551
6552         cf_cv_find_linkage_iconv=yes
6553         cf_cv_header_path_iconv=/usr/include
6554         cf_cv_library_path_iconv=/usr/lib
6555         cf_cv_library_file_iconv="-liconv"
6556
6557 else
6558   echo "$as_me: failed program was:" >&5
6559 cat conftest.$ac_ext >&5
6560
6561         cf_cv_find_linkage_iconv=no
6562         LIBS="$cf_save_LIBS"
6563
6564     test -n "$verbose" && echo "        find linkage for iconv library" 1>&6
6565
6566 echo "${as_me:-configure}:6566: testing find linkage for iconv library ..." 1>&5
6567
6568 echo "${as_me:-configure}:6568: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
6569
6570     cf_save_CPPFLAGS="$CPPFLAGS"
6571     cf_test_CPPFLAGS="$CPPFLAGS"
6572
6573 cf_search=
6574
6575 # collect the current set of include-directories from compiler flags
6576 cf_header_path_list=""
6577 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6578         for cf_header_path in $CPPFLAGS $CFLAGS
6579         do
6580                 case $cf_header_path in #(vi
6581                 -I*)
6582                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6583
6584 test "$cf_header_path" != "NONE" && \
6585 test -d "$cf_header_path" && \
6586  {
6587         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6588         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6589         test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
6590         test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
6591         test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
6592         test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
6593 }
6594
6595                         cf_header_path_list="$cf_header_path_list $cf_search"
6596                         ;;
6597                 esac
6598         done
6599 fi
6600
6601 # add the variations for the package we are looking for
6602
6603 cf_search=
6604
6605 test "/usr" != "$prefix" && \
6606 test -d "/usr" && \
6607 (test $prefix = NONE || test "/usr" != "$prefix") && {
6608         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6609         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6610         test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
6611         test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
6612         test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
6613         test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
6614 }
6615
6616 test "$prefix" != "NONE" && \
6617 test -d "$prefix" && \
6618  {
6619         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6620         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6621         test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
6622         test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
6623         test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
6624         test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
6625 }
6626
6627 test "/usr/local" != "$prefix" && \
6628 test -d "/usr/local" && \
6629 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6630         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6631         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6632         test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
6633         test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
6634         test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
6635         test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
6636 }
6637
6638 test "/opt" != "$prefix" && \
6639 test -d "/opt" && \
6640 (test $prefix = NONE || test "/opt" != "$prefix") && {
6641         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6642         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6643         test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
6644         test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
6645         test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
6646         test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
6647 }
6648
6649 test "$HOME" != "$prefix" && \
6650 test -d "$HOME" && \
6651 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6652         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6653         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6654         test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
6655         test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
6656         test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
6657         test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
6658 }
6659
6660 test "$includedir" != NONE && \
6661 test "$includedir" != "/usr/include" && \
6662 test -d "$includedir" && {
6663         test -d $includedir &&    cf_search="$cf_search $includedir"
6664         test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
6665 }
6666
6667 test "$oldincludedir" != NONE && \
6668 test "$oldincludedir" != "/usr/include" && \
6669 test -d "$oldincludedir" && {
6670         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6671         test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
6672 }
6673
6674 cf_search="$cf_search $cf_header_path_list"
6675
6676     for cf_cv_header_path_iconv in $cf_search
6677     do
6678       if test -d $cf_cv_header_path_iconv ; then
6679         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_iconv" 1>&6
6680
6681 echo "${as_me:-configure}:6681: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
6682
6683         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
6684         cat >conftest.$ac_ext <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6687
6688 #include <stdlib.h>
6689 #include <iconv.h>
6690
6691 int
6692 main ()
6693 {
6694
6695         iconv_t cd = iconv_open("","");
6696         iconv(cd,NULL,NULL,NULL,NULL);
6697         iconv_close(cd);
6698
6699   ;
6700   return 0;
6701 }
6702 _ACEOF
6703 rm -f conftest.$ac_objext
6704 if { (eval echo "$as_me:6704: \"$ac_compile\"") >&5
6705   (eval $ac_compile) 2>&5
6706   ac_status=$?
6707   echo "$as_me:6707: \$? = $ac_status" >&5
6708   (exit $ac_status); } &&
6709          { ac_try='test -s conftest.$ac_objext'
6710   { (eval echo "$as_me:6710: \"$ac_try\"") >&5
6711   (eval $ac_try) 2>&5
6712   ac_status=$?
6713   echo "$as_me:6713: \$? = $ac_status" >&5
6714   (exit $ac_status); }; }; then
6715
6716             test -n "$verbose" && echo "        ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
6719
6720             cf_cv_find_linkage_iconv=maybe
6721             cf_test_CPPFLAGS="$CPPFLAGS"
6722             break
6723 else
6724   echo "$as_me: failed program was:" >&5
6725 cat conftest.$ac_ext >&5
6726
6727             CPPFLAGS="$cf_save_CPPFLAGS"
6728
6729 fi
6730 rm -f conftest.$ac_objext conftest.$ac_ext
6731       fi
6732     done
6733
6734     if test "$cf_cv_find_linkage_iconv" = maybe ; then
6735
6736 echo "${as_me:-configure}:6736: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
6737
6738       cf_save_LIBS="$LIBS"
6739       cf_save_LDFLAGS="$LDFLAGS"
6740
6741       if test "$cf_cv_find_linkage_iconv" != yes ; then
6742
6743 cf_search=
6744 cf_library_path_list=""
6745 if test -n "${LDFLAGS}${LIBS}" ; then
6746         for cf_library_path in $LDFLAGS $LIBS
6747         do
6748                 case $cf_library_path in #(vi
6749                 -L*)
6750                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6751
6752 test "$cf_library_path" != "NONE" && \
6753 test -d "$cf_library_path" && \
6754  {
6755         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6756         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6757         test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
6758         test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
6759         test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
6760         test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
6761 }
6762
6763                         cf_library_path_list="$cf_library_path_list $cf_search"
6764                         ;;
6765                 esac
6766         done
6767 fi
6768
6769 cf_search=
6770
6771 test "/usr" != "$prefix" && \
6772 test -d "/usr" && \
6773 (test $prefix = NONE || test "/usr" != "$prefix") && {
6774         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6775         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6776         test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
6777         test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
6778         test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
6779         test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
6780 }
6781
6782 test "$prefix" != "NONE" && \
6783 test -d "$prefix" && \
6784  {
6785         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6786         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6787         test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
6788         test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
6789         test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
6790         test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
6791 }
6792
6793 test "/usr/local" != "$prefix" && \
6794 test -d "/usr/local" && \
6795 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6796         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6797         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6798         test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
6799         test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
6800         test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
6801         test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
6802 }
6803
6804 test "/opt" != "$prefix" && \
6805 test -d "/opt" && \
6806 (test $prefix = NONE || test "/opt" != "$prefix") && {
6807         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6808         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6809         test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
6810         test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
6811         test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
6812         test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
6813 }
6814
6815 test "$HOME" != "$prefix" && \
6816 test -d "$HOME" && \
6817 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6818         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6819         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6820         test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
6821         test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
6822         test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
6823         test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
6824 }
6825
6826 cf_search="$cf_library_path_list $cf_search"
6827
6828         for cf_cv_library_path_iconv in $cf_search
6829         do
6830           if test -d $cf_cv_library_path_iconv ; then
6831             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_iconv" 1>&6
6832
6833 echo "${as_me:-configure}:6833: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
6834
6835             CPPFLAGS="$cf_test_CPPFLAGS"
6836             LIBS="-liconv  $cf_save_LIBS"
6837             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
6838             cat >conftest.$ac_ext <<_ACEOF
6839 #line 6839 "configure"
6840 #include "confdefs.h"
6841
6842 #include <stdlib.h>
6843 #include <iconv.h>
6844
6845 int
6846 main ()
6847 {
6848
6849         iconv_t cd = iconv_open("","");
6850         iconv(cd,NULL,NULL,NULL,NULL);
6851         iconv_close(cd);
6852
6853   ;
6854   return 0;
6855 }
6856 _ACEOF
6857 rm -f conftest.$ac_objext conftest$ac_exeext
6858 if { (eval echo "$as_me:6858: \"$ac_link\"") >&5
6859   (eval $ac_link) 2>&5
6860   ac_status=$?
6861   echo "$as_me:6861: \$? = $ac_status" >&5
6862   (exit $ac_status); } &&
6863          { ac_try='test -s conftest$ac_exeext'
6864   { (eval echo "$as_me:6864: \"$ac_try\"") >&5
6865   (eval $ac_try) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); }; }; then
6869
6870                 test -n "$verbose" && echo "    ... found iconv library in $cf_cv_library_path_iconv" 1>&6
6871
6872 echo "${as_me:-configure}:6872: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
6873
6874                 cf_cv_find_linkage_iconv=yes
6875                 cf_cv_library_file_iconv="-liconv"
6876                 break
6877 else
6878   echo "$as_me: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880
6881                 CPPFLAGS="$cf_save_CPPFLAGS"
6882                 LIBS="$cf_save_LIBS"
6883                 LDFLAGS="$cf_save_LDFLAGS"
6884
6885 fi
6886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887           fi
6888         done
6889         CPPFLAGS="$cf_save_CPPFLAGS"
6890         LDFLAGS="$cf_save_LDFLAGS"
6891       fi
6892
6893     else
6894       cf_cv_find_linkage_iconv=no
6895     fi
6896
6897 fi
6898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6899
6900 fi
6901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6902
6903 LIBS="$cf_save_LIBS"
6904
6905 if test "$cf_cv_find_linkage_iconv" = yes ; then
6906 am_cv_func_iconv=yes
6907 else
6908 am_cv_func_iconv="no, consider installing GNU libiconv"
6909 fi
6910
6911 fi
6912 echo "$as_me:6912: result: $am_cv_func_iconv" >&5
6913 echo "${ECHO_T}$am_cv_func_iconv" >&6
6914
6915   if test "$am_cv_func_iconv" = yes; then
6916
6917 cat >>confdefs.h <<\EOF
6918 #define HAVE_ICONV 1
6919 EOF
6920
6921     echo "$as_me:6921: checking if the declaration of iconv() needs const." >&5
6922 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
6923 if test "${am_cv_proto_iconv_const+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926
6927       cat >conftest.$ac_ext <<_ACEOF
6928 #line 6928 "configure"
6929 #include "confdefs.h"
6930
6931 #include <stdlib.h>
6932 #include <iconv.h>
6933
6934 extern
6935 #ifdef __cplusplus
6936 "C"
6937 #endif
6938 #if defined(__STDC__) || defined(__cplusplus)
6939 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6940 #else
6941 size_t iconv();
6942 #endif
6943
6944 int
6945 main ()
6946 {
6947
6948   ;
6949   return 0;
6950 }
6951 _ACEOF
6952 rm -f conftest.$ac_objext
6953 if { (eval echo "$as_me:6953: \"$ac_compile\"") >&5
6954   (eval $ac_compile) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit $ac_status); } &&
6958          { ac_try='test -s conftest.$ac_objext'
6959   { (eval echo "$as_me:6959: \"$ac_try\"") >&5
6960   (eval $ac_try) 2>&5
6961   ac_status=$?
6962   echo "$as_me:6962: \$? = $ac_status" >&5
6963   (exit $ac_status); }; }; then
6964   am_cv_proto_iconv_const=no
6965 else
6966   echo "$as_me: failed program was:" >&5
6967 cat conftest.$ac_ext >&5
6968 am_cv_proto_iconv_const=yes
6969 fi
6970 rm -f conftest.$ac_objext conftest.$ac_ext
6971 fi
6972 echo "$as_me:6972: result: $am_cv_proto_iconv_const" >&5
6973 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
6974
6975     if test "$am_cv_proto_iconv_const" = yes ; then
6976       am_cv_proto_iconv_arg1="const"
6977     else
6978       am_cv_proto_iconv_arg1=""
6979     fi
6980
6981 cat >>confdefs.h <<EOF
6982 #define ICONV_CONST $am_cv_proto_iconv_arg1
6983 EOF
6984
6985   fi
6986
6987   LIBICONV=
6988   if test "$cf_cv_find_linkage_iconv" = yes; then
6989
6990 if test -n "$cf_cv_header_path_iconv" ; then
6991   for cf_add_incdir in $cf_cv_header_path_iconv
6992   do
6993         while test $cf_add_incdir != /usr/include
6994         do
6995           if test -d $cf_add_incdir
6996           then
6997                 cf_have_incdir=no
6998                 if test -n "$CFLAGS$CPPFLAGS" ; then
6999                   # a loop is needed to ensure we can add subdirs of existing dirs
7000                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7001                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7002                           cf_have_incdir=yes; break
7003                         fi
7004                   done
7005                 fi
7006
7007                 if test "$cf_have_incdir" = no ; then
7008                   if test "$cf_add_incdir" = /usr/local/include ; then
7009                         if test "$GCC" = yes
7010                         then
7011                           cf_save_CPPFLAGS=$CPPFLAGS
7012                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7013                           cat >conftest.$ac_ext <<_ACEOF
7014 #line 7014 "configure"
7015 #include "confdefs.h"
7016 #include <stdio.h>
7017 int
7018 main ()
7019 {
7020 printf("Hello")
7021   ;
7022   return 0;
7023 }
7024 _ACEOF
7025 rm -f conftest.$ac_objext
7026 if { (eval echo "$as_me:7026: \"$ac_compile\"") >&5
7027   (eval $ac_compile) 2>&5
7028   ac_status=$?
7029   echo "$as_me:7029: \$? = $ac_status" >&5
7030   (exit $ac_status); } &&
7031          { ac_try='test -s conftest.$ac_objext'
7032   { (eval echo "$as_me:7032: \"$ac_try\"") >&5
7033   (eval $ac_try) 2>&5
7034   ac_status=$?
7035   echo "$as_me:7035: \$? = $ac_status" >&5
7036   (exit $ac_status); }; }; then
7037   :
7038 else
7039   echo "$as_me: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7041 cf_have_incdir=yes
7042 fi
7043 rm -f conftest.$ac_objext conftest.$ac_ext
7044                           CPPFLAGS=$cf_save_CPPFLAGS
7045                         fi
7046                   fi
7047                 fi
7048
7049                 if test "$cf_have_incdir" = no ; then
7050                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7051
7052 echo "${as_me:-configure}:7052: testing adding $cf_add_incdir to include-path ..." 1>&5
7053
7054                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7055
7056                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7057                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7058                   cf_add_incdir="$cf_top_incdir"
7059                 else
7060                   break
7061                 fi
7062           fi
7063         done
7064   done
7065 fi
7066
7067     if test -n "$cf_cv_library_file_iconv" ; then
7068       LIBICONV="-liconv"
7069
7070 if test -n "$cf_cv_library_path_iconv" ; then
7071   for cf_add_libdir in $cf_cv_library_path_iconv
7072   do
7073     if test $cf_add_libdir = /usr/lib ; then
7074       :
7075     elif test -d $cf_add_libdir
7076     then
7077       cf_have_libdir=no
7078       if test -n "$LDFLAGS$LIBS" ; then
7079         # a loop is needed to ensure we can add subdirs of existing dirs
7080         for cf_test_libdir in $LDFLAGS $LIBS ; do
7081           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7082             cf_have_libdir=yes; break
7083           fi
7084         done
7085       fi
7086       if test "$cf_have_libdir" = no ; then
7087         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7088
7089 echo "${as_me:-configure}:7089: testing adding $cf_add_libdir to library-path ..." 1>&5
7090
7091         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7092       fi
7093     fi
7094   done
7095 fi
7096
7097     fi
7098   fi
7099
7100   echo "$as_me:7100: checking for nl_langinfo and CODESET" >&5
7101 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7102 if test "${am_cv_langinfo_codeset+set}" = set; then
7103   echo $ECHO_N "(cached) $ECHO_C" >&6
7104 else
7105   cat >conftest.$ac_ext <<_ACEOF
7106 #line 7106 "configure"
7107 #include "confdefs.h"
7108 #include <langinfo.h>
7109 int
7110 main ()
7111 {
7112 char* cs = nl_langinfo(CODESET);
7113   ;
7114   return 0;
7115 }
7116 _ACEOF
7117 rm -f conftest.$ac_objext conftest$ac_exeext
7118 if { (eval echo "$as_me:7118: \"$ac_link\"") >&5
7119   (eval $ac_link) 2>&5
7120   ac_status=$?
7121   echo "$as_me:7121: \$? = $ac_status" >&5
7122   (exit $ac_status); } &&
7123          { ac_try='test -s conftest$ac_exeext'
7124   { (eval echo "$as_me:7124: \"$ac_try\"") >&5
7125   (eval $ac_try) 2>&5
7126   ac_status=$?
7127   echo "$as_me:7127: \$? = $ac_status" >&5
7128   (exit $ac_status); }; }; then
7129   am_cv_langinfo_codeset=yes
7130 else
7131   echo "$as_me: failed program was:" >&5
7132 cat conftest.$ac_ext >&5
7133 am_cv_langinfo_codeset=no
7134 fi
7135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7136
7137 fi
7138 echo "$as_me:7138: result: $am_cv_langinfo_codeset" >&5
7139 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7140   if test $am_cv_langinfo_codeset = yes; then
7141
7142 cat >>confdefs.h <<\EOF
7143 #define HAVE_LANGINFO_CODESET 1
7144 EOF
7145
7146   fi
7147
7148    if test $ac_cv_header_locale_h = yes; then
7149     echo "$as_me:7149: checking for LC_MESSAGES" >&5
7150 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7151 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7152   echo $ECHO_N "(cached) $ECHO_C" >&6
7153 else
7154   cat >conftest.$ac_ext <<_ACEOF
7155 #line 7155 "configure"
7156 #include "confdefs.h"
7157 #include <locale.h>
7158 int
7159 main ()
7160 {
7161 return LC_MESSAGES
7162   ;
7163   return 0;
7164 }
7165 _ACEOF
7166 rm -f conftest.$ac_objext conftest$ac_exeext
7167 if { (eval echo "$as_me:7167: \"$ac_link\"") >&5
7168   (eval $ac_link) 2>&5
7169   ac_status=$?
7170   echo "$as_me:7170: \$? = $ac_status" >&5
7171   (exit $ac_status); } &&
7172          { ac_try='test -s conftest$ac_exeext'
7173   { (eval echo "$as_me:7173: \"$ac_try\"") >&5
7174   (eval $ac_try) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); }; }; then
7178   am_cv_val_LC_MESSAGES=yes
7179 else
7180   echo "$as_me: failed program was:" >&5
7181 cat conftest.$ac_ext >&5
7182 am_cv_val_LC_MESSAGES=no
7183 fi
7184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7185 fi
7186 echo "$as_me:7186: result: $am_cv_val_LC_MESSAGES" >&5
7187 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7188     if test $am_cv_val_LC_MESSAGES = yes; then
7189
7190 cat >>confdefs.h <<\EOF
7191 #define HAVE_LC_MESSAGES 1
7192 EOF
7193
7194     fi
7195   fi
7196    echo "$as_me:7196: checking whether NLS is requested" >&5
7197 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
7198
7199 # Check whether --enable-nls or --disable-nls was given.
7200 if test "${enable_nls+set}" = set; then
7201   enableval="$enable_nls"
7202   USE_NLS=$enableval
7203 else
7204   USE_NLS=no
7205 fi;
7206   echo "$as_me:7206: result: $USE_NLS" >&5
7207 echo "${ECHO_T}$USE_NLS" >&6
7208
7209   BUILD_INCLUDED_LIBINTL=no
7210   USE_INCLUDED_LIBINTL=no
7211   INTLLIBS=
7212
7213     if test "$USE_NLS" = "yes"; then
7214
7215 cat >>confdefs.h <<\EOF
7216 #define ENABLE_NLS 1
7217 EOF
7218
7219     echo "$as_me:7219: checking whether included gettext is requested" >&5
7220 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
7221
7222 # Check whether --with-included-gettext or --without-included-gettext was given.
7223 if test "${with_included_gettext+set}" = set; then
7224   withval="$with_included_gettext"
7225   nls_cv_force_use_gnu_gettext=$withval
7226 else
7227   nls_cv_force_use_gnu_gettext=no
7228 fi;
7229     echo "$as_me:7229: result: $nls_cv_force_use_gnu_gettext" >&5
7230 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
7231
7232     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7233     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7234                         CATOBJEXT=NONE
7235
7236       cf_save_LIBS_1="$LIBS"
7237       LIBS="$LIBICONV $LIBS"
7238       echo "$as_me:7238: checking for libintl.h and gettext()" >&5
7239 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
7240 if test "${cf_cv_func_gettext+set}" = set; then
7241   echo $ECHO_N "(cached) $ECHO_C" >&6
7242 else
7243
7244 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7245 # will be set on completion of the AC_TRY_LINK below.
7246 cf_cv_header_path_intl=
7247 cf_cv_library_path_intl=
7248
7249 echo "${as_me:-configure}:7249: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
7250
7251 cf_save_LIBS="$LIBS"
7252
7253 cat >conftest.$ac_ext <<_ACEOF
7254 #line 7254 "configure"
7255 #include "confdefs.h"
7256
7257 #include <libintl.h>
7258 extern int _nl_msg_cat_cntr;
7259
7260 int
7261 main ()
7262 {
7263
7264     bindtextdomain ("", "");
7265     return (int) gettext ("")
7266
7267              + _nl_msg_cat_cntr
7268
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f conftest.$ac_objext conftest$ac_exeext
7274 if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275   (eval $ac_link) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit $ac_status); } &&
7279          { ac_try='test -s conftest$ac_exeext'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; }; then
7285
7286         cf_cv_find_linkage_intl=yes
7287         cf_cv_header_path_intl=/usr/include
7288         cf_cv_library_path_intl=/usr/lib
7289
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293
7294 LIBS="-lintl  $cf_save_LIBS"
7295
7296 cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299
7300 #include <libintl.h>
7301 extern int _nl_msg_cat_cntr;
7302
7303 int
7304 main ()
7305 {
7306
7307     bindtextdomain ("", "");
7308     return (int) gettext ("")
7309
7310              + _nl_msg_cat_cntr
7311
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext conftest$ac_exeext
7317 if { (eval echo "$as_me:7317: \"$ac_link\"") >&5
7318   (eval $ac_link) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest$ac_exeext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328
7329         cf_cv_find_linkage_intl=yes
7330         cf_cv_header_path_intl=/usr/include
7331         cf_cv_library_path_intl=/usr/lib
7332         cf_cv_library_file_intl="-lintl"
7333
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337
7338         cf_cv_find_linkage_intl=no
7339         LIBS="$cf_save_LIBS"
7340
7341     test -n "$verbose" && echo "        find linkage for intl library" 1>&6
7342
7343 echo "${as_me:-configure}:7343: testing find linkage for intl library ..." 1>&5
7344
7345 echo "${as_me:-configure}:7345: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
7346
7347     cf_save_CPPFLAGS="$CPPFLAGS"
7348     cf_test_CPPFLAGS="$CPPFLAGS"
7349
7350 cf_search=
7351
7352 # collect the current set of include-directories from compiler flags
7353 cf_header_path_list=""
7354 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7355         for cf_header_path in $CPPFLAGS $CFLAGS
7356         do
7357                 case $cf_header_path in #(vi
7358                 -I*)
7359                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7360
7361 test "$cf_header_path" != "NONE" && \
7362 test -d "$cf_header_path" && \
7363  {
7364         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7365         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7366         test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
7367         test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
7368         test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
7369         test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
7370 }
7371
7372                         cf_header_path_list="$cf_header_path_list $cf_search"
7373                         ;;
7374                 esac
7375         done
7376 fi
7377
7378 # add the variations for the package we are looking for
7379
7380 cf_search=
7381
7382 test "/usr" != "$prefix" && \
7383 test -d "/usr" && \
7384 (test $prefix = NONE || test "/usr" != "$prefix") && {
7385         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7386         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7387         test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
7388         test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
7389         test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
7390         test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
7391 }
7392
7393 test "$prefix" != "NONE" && \
7394 test -d "$prefix" && \
7395  {
7396         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7397         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7398         test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
7399         test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
7400         test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
7401         test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
7402 }
7403
7404 test "/usr/local" != "$prefix" && \
7405 test -d "/usr/local" && \
7406 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7407         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7408         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7409         test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
7410         test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
7411         test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
7412         test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
7413 }
7414
7415 test "/opt" != "$prefix" && \
7416 test -d "/opt" && \
7417 (test $prefix = NONE || test "/opt" != "$prefix") && {
7418         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7419         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7420         test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
7421         test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
7422         test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
7423         test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
7424 }
7425
7426 test "$HOME" != "$prefix" && \
7427 test -d "$HOME" && \
7428 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7429         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7430         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7431         test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
7432         test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
7433         test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
7434         test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
7435 }
7436
7437 test "$includedir" != NONE && \
7438 test "$includedir" != "/usr/include" && \
7439 test -d "$includedir" && {
7440         test -d $includedir &&    cf_search="$cf_search $includedir"
7441         test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
7442 }
7443
7444 test "$oldincludedir" != NONE && \
7445 test "$oldincludedir" != "/usr/include" && \
7446 test -d "$oldincludedir" && {
7447         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7448         test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
7449 }
7450
7451 cf_search="$cf_search $cf_header_path_list"
7452
7453     for cf_cv_header_path_intl in $cf_search
7454     do
7455       if test -d $cf_cv_header_path_intl ; then
7456         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_intl" 1>&6
7457
7458 echo "${as_me:-configure}:7458: testing ... testing $cf_cv_header_path_intl ..." 1>&5
7459
7460         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
7461         cat >conftest.$ac_ext <<_ACEOF
7462 #line 7462 "configure"
7463 #include "confdefs.h"
7464
7465 #include <libintl.h>
7466 extern int _nl_msg_cat_cntr;
7467
7468 int
7469 main ()
7470 {
7471
7472     bindtextdomain ("", "");
7473     return (int) gettext ("")
7474
7475              + _nl_msg_cat_cntr
7476
7477   ;
7478   return 0;
7479 }
7480 _ACEOF
7481 rm -f conftest.$ac_objext
7482 if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483   (eval $ac_compile) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit $ac_status); } &&
7487          { ac_try='test -s conftest.$ac_objext'
7488   { (eval echo "$as_me:7488: \"$ac_try\"") >&5
7489   (eval $ac_try) 2>&5
7490   ac_status=$?
7491   echo "$as_me:7491: \$? = $ac_status" >&5
7492   (exit $ac_status); }; }; then
7493
7494             test -n "$verbose" && echo "        ... found intl headers in $cf_cv_header_path_intl" 1>&6
7495
7496 echo "${as_me:-configure}:7496: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
7497
7498             cf_cv_find_linkage_intl=maybe
7499             cf_test_CPPFLAGS="$CPPFLAGS"
7500             break
7501 else
7502   echo "$as_me: failed program was:" >&5
7503 cat conftest.$ac_ext >&5
7504
7505             CPPFLAGS="$cf_save_CPPFLAGS"
7506
7507 fi
7508 rm -f conftest.$ac_objext conftest.$ac_ext
7509       fi
7510     done
7511
7512     if test "$cf_cv_find_linkage_intl" = maybe ; then
7513
7514 echo "${as_me:-configure}:7514: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
7515
7516       cf_save_LIBS="$LIBS"
7517       cf_save_LDFLAGS="$LDFLAGS"
7518
7519       if test "$cf_cv_find_linkage_intl" != yes ; then
7520
7521 cf_search=
7522 cf_library_path_list=""
7523 if test -n "${LDFLAGS}${LIBS}" ; then
7524         for cf_library_path in $LDFLAGS $LIBS
7525         do
7526                 case $cf_library_path in #(vi
7527                 -L*)
7528                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7529
7530 test "$cf_library_path" != "NONE" && \
7531 test -d "$cf_library_path" && \
7532  {
7533         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7534         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7535         test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
7536         test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
7537         test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
7538         test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
7539 }
7540
7541                         cf_library_path_list="$cf_library_path_list $cf_search"
7542                         ;;
7543                 esac
7544         done
7545 fi
7546
7547 cf_search=
7548
7549 test "/usr" != "$prefix" && \
7550 test -d "/usr" && \
7551 (test $prefix = NONE || test "/usr" != "$prefix") && {
7552         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7553         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7554         test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
7555         test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
7556         test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
7557         test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
7558 }
7559
7560 test "$prefix" != "NONE" && \
7561 test -d "$prefix" && \
7562  {
7563         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7564         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7565         test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
7566         test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
7567         test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
7568         test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
7569 }
7570
7571 test "/usr/local" != "$prefix" && \
7572 test -d "/usr/local" && \
7573 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7574         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7575         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7576         test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
7577         test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
7578         test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
7579         test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
7580 }
7581
7582 test "/opt" != "$prefix" && \
7583 test -d "/opt" && \
7584 (test $prefix = NONE || test "/opt" != "$prefix") && {
7585         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7586         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7587         test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
7588         test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
7589         test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
7590         test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
7591 }
7592
7593 test "$HOME" != "$prefix" && \
7594 test -d "$HOME" && \
7595 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7596         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7597         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7598         test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
7599         test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
7600         test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
7601         test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
7602 }
7603
7604 cf_search="$cf_library_path_list $cf_search"
7605
7606         for cf_cv_library_path_intl in $cf_search
7607         do
7608           if test -d $cf_cv_library_path_intl ; then
7609             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_intl" 1>&6
7610
7611 echo "${as_me:-configure}:7611: testing ... testing $cf_cv_library_path_intl ..." 1>&5
7612
7613             CPPFLAGS="$cf_test_CPPFLAGS"
7614             LIBS="-lintl  $cf_save_LIBS"
7615             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
7616             cat >conftest.$ac_ext <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619
7620 #include <libintl.h>
7621 extern int _nl_msg_cat_cntr;
7622
7623 int
7624 main ()
7625 {
7626
7627     bindtextdomain ("", "");
7628     return (int) gettext ("")
7629
7630              + _nl_msg_cat_cntr
7631
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 rm -f conftest.$ac_objext conftest$ac_exeext
7637 if { (eval echo "$as_me:7637: \"$ac_link\"") >&5
7638   (eval $ac_link) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); } &&
7642          { ac_try='test -s conftest$ac_exeext'
7643   { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644   (eval $ac_try) 2>&5
7645   ac_status=$?
7646   echo "$as_me:7646: \$? = $ac_status" >&5
7647   (exit $ac_status); }; }; then
7648
7649                 test -n "$verbose" && echo "    ... found intl library in $cf_cv_library_path_intl" 1>&6
7650
7651 echo "${as_me:-configure}:7651: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
7652
7653                 cf_cv_find_linkage_intl=yes
7654                 cf_cv_library_file_intl="-lintl"
7655                 break
7656 else
7657   echo "$as_me: failed program was:" >&5
7658 cat conftest.$ac_ext >&5
7659
7660                 CPPFLAGS="$cf_save_CPPFLAGS"
7661                 LIBS="$cf_save_LIBS"
7662                 LDFLAGS="$cf_save_LDFLAGS"
7663
7664 fi
7665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7666           fi
7667         done
7668         CPPFLAGS="$cf_save_CPPFLAGS"
7669         LDFLAGS="$cf_save_LDFLAGS"
7670       fi
7671
7672     else
7673       cf_cv_find_linkage_intl=no
7674     fi
7675
7676 fi
7677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7678
7679 fi
7680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7681
7682 LIBS="$cf_save_LIBS"
7683
7684 if test "$cf_cv_find_linkage_intl" = yes ; then
7685 cf_cv_func_gettext=yes
7686 else
7687 cf_cv_func_gettext=no
7688 fi
7689
7690 fi
7691 echo "$as_me:7691: result: $cf_cv_func_gettext" >&5
7692 echo "${ECHO_T}$cf_cv_func_gettext" >&6
7693       LIBS="$cf_save_LIBS_1"
7694
7695       if test "$cf_cv_func_gettext" = yes ; then
7696
7697 cat >>confdefs.h <<\EOF
7698 #define HAVE_LIBINTL_H 1
7699 EOF
7700
7701                                         if test "$PACKAGE" != gettext; then
7702
7703 cat >>confdefs.h <<\EOF
7704 #define HAVE_GETTEXT 1
7705 EOF
7706
7707 if test -n "$cf_cv_header_path_intl" ; then
7708   for cf_add_incdir in $cf_cv_header_path_intl
7709   do
7710         while test $cf_add_incdir != /usr/include
7711         do
7712           if test -d $cf_add_incdir
7713           then
7714                 cf_have_incdir=no
7715                 if test -n "$CFLAGS$CPPFLAGS" ; then
7716                   # a loop is needed to ensure we can add subdirs of existing dirs
7717                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7718                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7719                           cf_have_incdir=yes; break
7720                         fi
7721                   done
7722                 fi
7723
7724                 if test "$cf_have_incdir" = no ; then
7725                   if test "$cf_add_incdir" = /usr/local/include ; then
7726                         if test "$GCC" = yes
7727                         then
7728                           cf_save_CPPFLAGS=$CPPFLAGS
7729                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7730                           cat >conftest.$ac_ext <<_ACEOF
7731 #line 7731 "configure"
7732 #include "confdefs.h"
7733 #include <stdio.h>
7734 int
7735 main ()
7736 {
7737 printf("Hello")
7738   ;
7739   return 0;
7740 }
7741 _ACEOF
7742 rm -f conftest.$ac_objext
7743 if { (eval echo "$as_me:7743: \"$ac_compile\"") >&5
7744   (eval $ac_compile) 2>&5
7745   ac_status=$?
7746   echo "$as_me:7746: \$? = $ac_status" >&5
7747   (exit $ac_status); } &&
7748          { ac_try='test -s conftest.$ac_objext'
7749   { (eval echo "$as_me:7749: \"$ac_try\"") >&5
7750   (eval $ac_try) 2>&5
7751   ac_status=$?
7752   echo "$as_me:7752: \$? = $ac_status" >&5
7753   (exit $ac_status); }; }; then
7754   :
7755 else
7756   echo "$as_me: failed program was:" >&5
7757 cat conftest.$ac_ext >&5
7758 cf_have_incdir=yes
7759 fi
7760 rm -f conftest.$ac_objext conftest.$ac_ext
7761                           CPPFLAGS=$cf_save_CPPFLAGS
7762                         fi
7763                   fi
7764                 fi
7765
7766                 if test "$cf_have_incdir" = no ; then
7767                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7768
7769 echo "${as_me:-configure}:7769: testing adding $cf_add_incdir to include-path ..." 1>&5
7770
7771                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7772
7773                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7774                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7775                   cf_add_incdir="$cf_top_incdir"
7776                 else
7777                   break
7778                 fi
7779           fi
7780         done
7781   done
7782 fi
7783
7784           if test -n "$cf_cv_library_file_intl" ; then
7785                                                 INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
7786
7787 if test -n "$cf_cv_library_path_intl" ; then
7788   for cf_add_libdir in $cf_cv_library_path_intl
7789   do
7790     if test $cf_add_libdir = /usr/lib ; then
7791       :
7792     elif test -d $cf_add_libdir
7793     then
7794       cf_have_libdir=no
7795       if test -n "$LDFLAGS$LIBS" ; then
7796         # a loop is needed to ensure we can add subdirs of existing dirs
7797         for cf_test_libdir in $LDFLAGS $LIBS ; do
7798           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7799             cf_have_libdir=yes; break
7800           fi
7801         done
7802       fi
7803       if test "$cf_have_libdir" = no ; then
7804         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7805
7806 echo "${as_me:-configure}:7806: testing adding $cf_add_libdir to library-path ..." 1>&5
7807
7808         INTLLIBS="-L$cf_add_libdir $INTLLIBS"
7809       fi
7810     fi
7811   done
7812 fi
7813
7814           fi
7815
7816           gt_save_LIBS="$LIBS"
7817           LIBS="$LIBS $INTLLIBS"
7818
7819 for ac_func in dcgettext
7820 do
7821 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7822 echo "$as_me:7822: checking for $ac_func" >&5
7823 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7824 if eval "test \"\${$as_ac_var+set}\" = set"; then
7825   echo $ECHO_N "(cached) $ECHO_C" >&6
7826 else
7827   cat >conftest.$ac_ext <<_ACEOF
7828 #line 7828 "configure"
7829 #include "confdefs.h"
7830 /* System header to define __stub macros and hopefully few prototypes,
7831     which can conflict with char $ac_func (); below.  */
7832 #include <assert.h>
7833 /* Override any gcc2 internal prototype to avoid an error.  */
7834 #ifdef __cplusplus
7835 extern "C"
7836 #endif
7837 /* We use char because int might match the return type of a gcc2
7838    builtin and then its argument prototype would still apply.  */
7839 char $ac_func ();
7840 char (*f) ();
7841
7842 int
7843 main ()
7844 {
7845 /* The GNU C library defines this for functions which it implements
7846     to always fail with ENOSYS.  Some functions are actually named
7847     something starting with __ and the normal name is an alias.  */
7848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7849 choke me
7850 #else
7851 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7852 #endif
7853
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 rm -f conftest.$ac_objext conftest$ac_exeext
7859 if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
7860   (eval $ac_link) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); } &&
7864          { ac_try='test -s conftest$ac_exeext'
7865   { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866   (eval $ac_try) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit $ac_status); }; }; then
7870   eval "$as_ac_var=yes"
7871 else
7872   echo "$as_me: failed program was:" >&5
7873 cat conftest.$ac_ext >&5
7874 eval "$as_ac_var=no"
7875 fi
7876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7877 fi
7878 echo "$as_me:7878: result: `eval echo '${'$as_ac_var'}'`" >&5
7879 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7880 if test `eval echo '${'$as_ac_var'}'` = yes; then
7881   cat >>confdefs.h <<EOF
7882 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7883 EOF
7884
7885 fi
7886 done
7887
7888           LIBS="$gt_save_LIBS"
7889
7890                     # Extract the first word of "msgfmt", so it can be a program name with args.
7891
7892 set dummy msgfmt; ac_word=$2
7893 echo "$as_me:7893: checking for $ac_word" >&5
7894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7895 if test "${ac_cv_path_MSGFMT+set}" = set; then
7896   echo $ECHO_N "(cached) $ECHO_C" >&6
7897 else
7898   case "$MSGFMT" in
7899   [\\/]*|?:[\\/]*)
7900   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7901   ;;
7902   *)
7903   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7904   for ac_dir in $PATH; do
7905     test -z "$ac_dir" && ac_dir=.
7906     if test -f $ac_dir/$ac_word$ac_exeext; then
7907       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7908         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7909         break
7910       fi
7911     fi
7912   done
7913   IFS="$ac_save_ifs"
7914   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7915   ;;
7916 esac
7917 fi
7918 MSGFMT="$ac_cv_path_MSGFMT"
7919 if test "$MSGFMT" != ":"; then
7920   echo "$as_me:7920: result: $MSGFMT" >&5
7921 echo "${ECHO_T}$MSGFMT" >&6
7922 else
7923   echo "$as_me:7923: result: no" >&5
7924 echo "${ECHO_T}no" >&6
7925 fi
7926
7927           # Extract the first word of "gmsgfmt", so it can be a program name with args.
7928 set dummy gmsgfmt; ac_word=$2
7929 echo "$as_me:7929: checking for $ac_word" >&5
7930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7931 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7932   echo $ECHO_N "(cached) $ECHO_C" >&6
7933 else
7934   case $GMSGFMT in
7935   [\\/]* | ?:[\\/]*)
7936   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7937   ;;
7938   *)
7939   ac_save_IFS=$IFS; IFS=$ac_path_separator
7940 ac_dummy="$PATH"
7941 for ac_dir in $ac_dummy; do
7942   IFS=$ac_save_IFS
7943   test -z "$ac_dir" && ac_dir=.
7944   if $as_executable_p "$ac_dir/$ac_word"; then
7945    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7946    echo "$as_me:7946: found $ac_dir/$ac_word" >&5
7947    break
7948 fi
7949 done
7950
7951   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7952   ;;
7953 esac
7954 fi
7955 GMSGFMT=$ac_cv_path_GMSGFMT
7956
7957 if test -n "$GMSGFMT"; then
7958   echo "$as_me:7958: result: $GMSGFMT" >&5
7959 echo "${ECHO_T}$GMSGFMT" >&6
7960 else
7961   echo "$as_me:7961: result: no" >&5
7962 echo "${ECHO_T}no" >&6
7963 fi
7964
7965                     # Extract the first word of "xgettext", so it can be a program name with args.
7966
7967 set dummy xgettext; ac_word=$2
7968 echo "$as_me:7968: checking for $ac_word" >&5
7969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7970 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7971   echo $ECHO_N "(cached) $ECHO_C" >&6
7972 else
7973   case "$XGETTEXT" in
7974   [\\/]*|?:[\\/]*)
7975   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7976   ;;
7977   *)
7978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7979   for ac_dir in $PATH; do
7980     test -z "$ac_dir" && ac_dir=.
7981     if test -f $ac_dir/$ac_word$ac_exeext; then
7982       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7983         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7984         break
7985       fi
7986     fi
7987   done
7988   IFS="$ac_save_ifs"
7989   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7990   ;;
7991 esac
7992 fi
7993 XGETTEXT="$ac_cv_path_XGETTEXT"
7994 if test "$XGETTEXT" != ":"; then
7995   echo "$as_me:7995: result: $XGETTEXT" >&5
7996 echo "${ECHO_T}$XGETTEXT" >&6
7997 else
7998   echo "$as_me:7998: result: no" >&5
7999 echo "${ECHO_T}no" >&6
8000 fi
8001
8002           CATOBJEXT=.gmo
8003         fi
8004       fi
8005
8006       if test "$CATOBJEXT" = "NONE"; then
8007                         nls_cv_use_gnu_gettext=yes
8008       fi
8009     fi
8010
8011     if test "$nls_cv_use_gnu_gettext" = "yes"; then
8012       if test ! -d $srcdir/intl ; then
8013         { { echo "$as_me:8013: error: no NLS library is packaged with this application" >&5
8014 echo "$as_me: error: no NLS library is packaged with this application" >&2;}
8015    { (exit 1); exit 1; }; }
8016       fi
8017             INTLOBJS="\$(GETTOBJS)"
8018       # Extract the first word of "msgfmt", so it can be a program name with args.
8019
8020 set dummy msgfmt; ac_word=$2
8021 echo "$as_me:8021: checking for $ac_word" >&5
8022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8023 if test "${ac_cv_path_MSGFMT+set}" = set; then
8024   echo $ECHO_N "(cached) $ECHO_C" >&6
8025 else
8026   case "$MSGFMT" in
8027   [\\/]*|?:[\\/]*)
8028   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8029   ;;
8030   *)
8031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8032   for ac_dir in $PATH; do
8033     test -z "$ac_dir" && ac_dir=.
8034     if test -f $ac_dir/$ac_word$ac_exeext; then
8035       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
8036         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
8037         break
8038       fi
8039     fi
8040   done
8041   IFS="$ac_save_ifs"
8042   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
8043   ;;
8044 esac
8045 fi
8046 MSGFMT="$ac_cv_path_MSGFMT"
8047 if test "$MSGFMT" != ":"; then
8048   echo "$as_me:8048: result: $MSGFMT" >&5
8049 echo "${ECHO_T}$MSGFMT" >&6
8050 else
8051   echo "$as_me:8051: result: no" >&5
8052 echo "${ECHO_T}no" >&6
8053 fi
8054
8055       # Extract the first word of "gmsgfmt", so it can be a program name with args.
8056 set dummy gmsgfmt; ac_word=$2
8057 echo "$as_me:8057: checking for $ac_word" >&5
8058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8059 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8060   echo $ECHO_N "(cached) $ECHO_C" >&6
8061 else
8062   case $GMSGFMT in
8063   [\\/]* | ?:[\\/]*)
8064   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8065   ;;
8066   *)
8067   ac_save_IFS=$IFS; IFS=$ac_path_separator
8068 ac_dummy="$PATH"
8069 for ac_dir in $ac_dummy; do
8070   IFS=$ac_save_IFS
8071   test -z "$ac_dir" && ac_dir=.
8072   if $as_executable_p "$ac_dir/$ac_word"; then
8073    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8074    echo "$as_me:8074: found $ac_dir/$ac_word" >&5
8075    break
8076 fi
8077 done
8078
8079   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8080   ;;
8081 esac
8082 fi
8083 GMSGFMT=$ac_cv_path_GMSGFMT
8084
8085 if test -n "$GMSGFMT"; then
8086   echo "$as_me:8086: result: $GMSGFMT" >&5
8087 echo "${ECHO_T}$GMSGFMT" >&6
8088 else
8089   echo "$as_me:8089: result: no" >&5
8090 echo "${ECHO_T}no" >&6
8091 fi
8092
8093       # Extract the first word of "xgettext", so it can be a program name with args.
8094
8095 set dummy xgettext; ac_word=$2
8096 echo "$as_me:8096: checking for $ac_word" >&5
8097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8098 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8099   echo $ECHO_N "(cached) $ECHO_C" >&6
8100 else
8101   case "$XGETTEXT" in
8102   [\\/]*|?:[\\/]*)
8103   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8104   ;;
8105   *)
8106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8107   for ac_dir in $PATH; do
8108     test -z "$ac_dir" && ac_dir=.
8109     if test -f $ac_dir/$ac_word$ac_exeext; then
8110       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
8111         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
8112         break
8113       fi
8114     fi
8115   done
8116   IFS="$ac_save_ifs"
8117   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8118   ;;
8119 esac
8120 fi
8121 XGETTEXT="$ac_cv_path_XGETTEXT"
8122 if test "$XGETTEXT" != ":"; then
8123   echo "$as_me:8123: result: $XGETTEXT" >&5
8124 echo "${ECHO_T}$XGETTEXT" >&6
8125 else
8126   echo "$as_me:8126: result: no" >&5
8127 echo "${ECHO_T}no" >&6
8128 fi
8129
8130       BUILD_INCLUDED_LIBINTL=yes
8131       USE_INCLUDED_LIBINTL=yes
8132       CATOBJEXT=.gmo
8133       INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
8134       LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
8135     fi
8136
8137             if test "$GMSGFMT" != ":"; then
8138                   if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
8139         : ;
8140       else
8141         echo "$as_me:8141: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
8142 echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
8143         GMSGFMT=":"
8144       fi
8145     fi
8146
8147             if test "$XGETTEXT" != ":"; then
8148                       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
8149         : ;
8150       else
8151         echo "$as_me:8151: result: found xgettext program is not GNU xgettext; ignore it" >&5
8152 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8153         XGETTEXT=":"
8154       fi
8155     fi
8156
8157         POSUB=po
8158   fi
8159
8160   ac_config_commands="$ac_config_commands default-1"
8161
8162       if test "$PACKAGE" = gettext; then
8163     BUILD_INCLUDED_LIBINTL=yes
8164   fi
8165
8166                       if test "$nls_cv_use_gnu_gettext" = "yes"; then
8167     for ac_prog in bison
8168 do
8169   # Extract the first word of "$ac_prog", so it can be a program name with args.
8170 set dummy $ac_prog; ac_word=$2
8171 echo "$as_me:8171: checking for $ac_word" >&5
8172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8173 if test "${ac_cv_prog_INTLBISON+set}" = set; then
8174   echo $ECHO_N "(cached) $ECHO_C" >&6
8175 else
8176   if test -n "$INTLBISON"; then
8177   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
8178 else
8179   ac_save_IFS=$IFS; IFS=$ac_path_separator
8180 ac_dummy="$PATH"
8181 for ac_dir in $ac_dummy; do
8182   IFS=$ac_save_IFS
8183   test -z "$ac_dir" && ac_dir=.
8184   $as_executable_p "$ac_dir/$ac_word" || continue
8185 ac_cv_prog_INTLBISON="$ac_prog"
8186 echo "$as_me:8186: found $ac_dir/$ac_word" >&5
8187 break
8188 done
8189
8190 fi
8191 fi
8192 INTLBISON=$ac_cv_prog_INTLBISON
8193 if test -n "$INTLBISON"; then
8194   echo "$as_me:8194: result: $INTLBISON" >&5
8195 echo "${ECHO_T}$INTLBISON" >&6
8196 else
8197   echo "$as_me:8197: result: no" >&5
8198 echo "${ECHO_T}no" >&6
8199 fi
8200
8201   test -n "$INTLBISON" && break
8202 done
8203
8204     if test -z "$INTLBISON"; then
8205       ac_verc_fail=yes
8206     else
8207             echo "$as_me:8207: checking version of bison" >&5
8208 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
8209       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8210       case $ac_prog_version in
8211         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8212         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8213            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8214         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8215       esac
8216     echo "$as_me:8216: result: $ac_prog_version" >&5
8217 echo "${ECHO_T}$ac_prog_version" >&6
8218     fi
8219     if test $ac_verc_fail = yes; then
8220       INTLBISON=:
8221     fi
8222   fi
8223
8224         for lang in $ALL_LINGUAS; do
8225     GMOFILES="$GMOFILES $lang.gmo"
8226     POFILES="$POFILES $lang.po"
8227   done
8228
8229     nls_cv_header_intl=
8230   nls_cv_header_libgt=
8231
8232     DATADIRNAME=share
8233
8234     INSTOBJEXT=.mo
8235
8236     GENCAT=gencat
8237
8238    if test "x$CATOBJEXT" != "x"; then
8239      if test "x$ALL_LINGUAS" = "x"; then
8240        LINGUAS=
8241      else
8242        echo "$as_me:8242: checking for catalogs to be installed" >&5
8243 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8244        NEW_LINGUAS=
8245        for presentlang in $ALL_LINGUAS; do
8246          useit=no
8247          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
8248            # Use the presentlang catalog if desiredlang is
8249            #   a. equal to presentlang, or
8250            #   b. a variant of presentlang (because in this case,
8251            #      presentlang can be used as a fallback for messages
8252            #      which are not translated in the desiredlang catalog).
8253            case "$desiredlang" in
8254              "$presentlang"*) useit=yes;;
8255            esac
8256          done
8257          if test $useit = yes; then
8258            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8259          fi
8260        done
8261        LINGUAS=$NEW_LINGUAS
8262        echo "$as_me:8262: result: $LINGUAS" >&5
8263 echo "${ECHO_T}$LINGUAS" >&6
8264      fi
8265
8266           if test -n "$LINGUAS"; then
8267        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8268      fi
8269    fi
8270
8271       INTL_LIBTOOL_SUFFIX_PREFIX=
8272
8273 if test "$USE_NLS" = yes ; then
8274
8275 # Check whether --with-textdomain or --without-textdomain was given.
8276 if test "${with_textdomain+set}" = set; then
8277   withval="$with_textdomain"
8278   NLS_TEXTDOMAIN=$withval
8279 else
8280   NLS_TEXTDOMAIN=$PACKAGE
8281 fi;
8282
8283 cat >>confdefs.h <<EOF
8284 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
8285 EOF
8286
8287 fi
8288
8289 INTLDIR_MAKE=
8290 MSG_DIR_MAKE=
8291 SUB_MAKEFILE=
8292
8293 cf_makefile=makefile
8294
8295 use_our_messages=no
8296 if test "$USE_NLS" = yes ; then
8297 if test -d $srcdir/po ; then
8298 echo "$as_me:8298: checking if we should use included message-library" >&5
8299 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
8300
8301 # Check whether --enable-included-msgs or --disable-included-msgs was given.
8302 if test "${enable_included_msgs+set}" = set; then
8303   enableval="$enable_included_msgs"
8304   use_our_messages=$enableval
8305 else
8306   use_our_messages=yes
8307 fi;
8308 fi
8309 echo "$as_me:8309: result: $use_our_messages" >&5
8310 echo "${ECHO_T}$use_our_messages" >&6
8311 fi
8312
8313 MSG_DIR_MAKE="#"
8314 if test "$use_our_messages" = yes
8315 then
8316         SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
8317         MSG_DIR_MAKE=
8318 fi
8319
8320 if test "$USE_INCLUDED_LIBINTL" = yes ; then
8321         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8322                 :
8323         elif test "$nls_cv_use_gnu_gettext" = yes ; then
8324                 :
8325         else
8326                 INTLDIR_MAKE="#"
8327         fi
8328         if test -z "$INTLDIR_MAKE"; then
8329
8330 cat >>confdefs.h <<\EOF
8331 #define HAVE_LIBGETTEXT_H 1
8332 EOF
8333
8334                 for cf_makefile in \
8335                         $srcdir/intl/Makefile.in \
8336                         $srcdir/intl/makefile.in
8337                 do
8338                         if test -f "$cf_makefile" ; then
8339                                 SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
8340                                 break
8341                         fi
8342                 done
8343         fi
8344 else
8345         INTLDIR_MAKE="#"
8346         if test "$USE_NLS" = yes ; then
8347
8348 for ac_header in libintl.h
8349 do
8350 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8351 echo "$as_me:8351: checking for $ac_header" >&5
8352 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8353 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8354   echo $ECHO_N "(cached) $ECHO_C" >&6
8355 else
8356   cat >conftest.$ac_ext <<_ACEOF
8357 #line 8357 "configure"
8358 #include "confdefs.h"
8359 #include <$ac_header>
8360 _ACEOF
8361 if { (eval echo "$as_me:8361: \"$ac_cpp conftest.$ac_ext\"") >&5
8362   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8363   ac_status=$?
8364   egrep -v '^ *\+' conftest.er1 >conftest.err
8365   rm -f conftest.er1
8366   cat conftest.err >&5
8367   echo "$as_me:8367: \$? = $ac_status" >&5
8368   (exit $ac_status); } >/dev/null; then
8369   if test -s conftest.err; then
8370     ac_cpp_err=$ac_c_preproc_warn_flag
8371   else
8372     ac_cpp_err=
8373   fi
8374 else
8375   ac_cpp_err=yes
8376 fi
8377 if test -z "$ac_cpp_err"; then
8378   eval "$as_ac_Header=yes"
8379 else
8380   echo "$as_me: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   eval "$as_ac_Header=no"
8383 fi
8384 rm -f conftest.err conftest.$ac_ext
8385 fi
8386 echo "$as_me:8386: result: `eval echo '${'$as_ac_Header'}'`" >&5
8387 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8388 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8389   cat >>confdefs.h <<EOF
8390 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8391 EOF
8392
8393 fi
8394 done
8395
8396         fi
8397 fi
8398
8399 if test -z "$INTLDIR_MAKE" ; then
8400         CPPFLAGS="$CPPFLAGS -I../intl"
8401 fi
8402
8403 if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
8404         GT_YES="#"
8405         GT_NO=
8406 else
8407         GT_YES=
8408         GT_NO="#"
8409 fi
8410
8411 if test "$USE_INCLUDED_LIBINTL" = yes ; then
8412         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8413
8414 cat >>confdefs.h <<\EOF
8415 #define HAVE_GETTEXT 1
8416 EOF
8417
8418         elif test "$nls_cv_use_gnu_gettext" = yes ; then
8419
8420 cat >>confdefs.h <<\EOF
8421 #define HAVE_GETTEXT 1
8422 EOF
8423
8424         fi
8425         if test -n "$nls_cv_header_intl" ; then
8426
8427 cat >>confdefs.h <<\EOF
8428 #define HAVE_LIBINTL_H 1
8429 EOF
8430
8431         fi
8432 fi
8433
8434 echo "$as_me:8434: checking if -lm needed for math functions" >&5
8435 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
8436 if test "${cf_cv_need_libm+set}" = set; then
8437   echo $ECHO_N "(cached) $ECHO_C" >&6
8438 else
8439
8440         cat >conftest.$ac_ext <<_ACEOF
8441 #line 8441 "configure"
8442 #include "confdefs.h"
8443
8444         #include <stdio.h>
8445         #include <math.h>
8446
8447 int
8448 main ()
8449 {
8450 double x = rand(); printf("result = %g\n", sqrt(x))
8451   ;
8452   return 0;
8453 }
8454 _ACEOF
8455 rm -f conftest.$ac_objext conftest$ac_exeext
8456 if { (eval echo "$as_me:8456: \"$ac_link\"") >&5
8457   (eval $ac_link) 2>&5
8458   ac_status=$?
8459   echo "$as_me:8459: \$? = $ac_status" >&5
8460   (exit $ac_status); } &&
8461          { ac_try='test -s conftest$ac_exeext'
8462   { (eval echo "$as_me:8462: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit $ac_status); }; }; then
8467   cf_cv_need_libm=no
8468 else
8469   echo "$as_me: failed program was:" >&5
8470 cat conftest.$ac_ext >&5
8471 cf_cv_need_libm=yes
8472 fi
8473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8474 fi
8475 echo "$as_me:8475: result: $cf_cv_need_libm" >&5
8476 echo "${ECHO_T}$cf_cv_need_libm" >&6
8477 if test "$cf_cv_need_libm" = yes
8478 then
8479
8480         LIBS="-lm $LIBS"
8481
8482 fi
8483
8484 echo "$as_me:8484: checking if you want to use dmalloc for testing" >&5
8485 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
8486
8487 # Check whether --with-dmalloc or --without-dmalloc was given.
8488 if test "${with_dmalloc+set}" = set; then
8489   withval="$with_dmalloc"
8490
8491 cat >>confdefs.h <<EOF
8492 #define USE_DMALLOC 1
8493 EOF
8494
8495         : ${with_cflags:=-g}
8496         : ${with_no_leaks:=yes}
8497          with_dmalloc=yes
8498 else
8499   with_dmalloc=
8500 fi;
8501 echo "$as_me:8501: result: ${with_dmalloc:-no}" >&5
8502 echo "${ECHO_T}${with_dmalloc:-no}" >&6
8503
8504 case .$with_cflags in #(vi
8505 .*-g*)
8506         case .$CFLAGS in #(vi
8507         .*-g*) #(vi
8508                 ;;
8509         *)
8510
8511 cf_fix_cppflags=no
8512 cf_new_cflags=
8513 cf_new_cppflags=
8514 cf_new_extra_cppflags=
8515
8516 for cf_add_cflags in -g
8517 do
8518 case $cf_fix_cppflags in
8519 no)
8520         case $cf_add_cflags in #(vi
8521         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8522                 case $cf_add_cflags in
8523                 -D*)
8524                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8525
8526                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8527                                 && test -z "${cf_tst_cflags}" \
8528                                 && cf_fix_cppflags=yes
8529
8530                         if test $cf_fix_cppflags = yes ; then
8531                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8532                                 continue
8533                         elif test "${cf_tst_cflags}" = "\"'" ; then
8534                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8535                                 continue
8536                         fi
8537                         ;;
8538                 esac
8539                 case "$CPPFLAGS" in
8540                 *$cf_add_cflags) #(vi
8541                         ;;
8542                 *) #(vi
8543                         case $cf_add_cflags in #(vi
8544                         -D*)
8545                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8546
8547 CPPFLAGS=`echo "$CPPFLAGS" | \
8548         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8549                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8550
8551                                 ;;
8552                         esac
8553                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8554                         ;;
8555                 esac
8556                 ;;
8557         *)
8558                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8559                 ;;
8560         esac
8561         ;;
8562 yes)
8563         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8564
8565         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8566
8567         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8568                 && test -z "${cf_tst_cflags}" \
8569                 && cf_fix_cppflags=no
8570         ;;
8571 esac
8572 done
8573
8574 if test -n "$cf_new_cflags" ; then
8575
8576         CFLAGS="$CFLAGS $cf_new_cflags"
8577 fi
8578
8579 if test -n "$cf_new_cppflags" ; then
8580
8581         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8582 fi
8583
8584 if test -n "$cf_new_extra_cppflags" ; then
8585
8586         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8587 fi
8588
8589                 ;;
8590         esac
8591         ;;
8592 esac
8593
8594 if test "$with_dmalloc" = yes ; then
8595         echo "$as_me:8595: checking for dmalloc.h" >&5
8596 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
8597 if test "${ac_cv_header_dmalloc_h+set}" = set; then
8598   echo $ECHO_N "(cached) $ECHO_C" >&6
8599 else
8600   cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603 #include <dmalloc.h>
8604 _ACEOF
8605 if { (eval echo "$as_me:8605: \"$ac_cpp conftest.$ac_ext\"") >&5
8606   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8607   ac_status=$?
8608   egrep -v '^ *\+' conftest.er1 >conftest.err
8609   rm -f conftest.er1
8610   cat conftest.err >&5
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); } >/dev/null; then
8613   if test -s conftest.err; then
8614     ac_cpp_err=$ac_c_preproc_warn_flag
8615   else
8616     ac_cpp_err=
8617   fi
8618 else
8619   ac_cpp_err=yes
8620 fi
8621 if test -z "$ac_cpp_err"; then
8622   ac_cv_header_dmalloc_h=yes
8623 else
8624   echo "$as_me: failed program was:" >&5
8625   cat conftest.$ac_ext >&5
8626   ac_cv_header_dmalloc_h=no
8627 fi
8628 rm -f conftest.err conftest.$ac_ext
8629 fi
8630 echo "$as_me:8630: result: $ac_cv_header_dmalloc_h" >&5
8631 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
8632 if test $ac_cv_header_dmalloc_h = yes; then
8633
8634 echo "$as_me:8634: checking for dmalloc_debug in -ldmalloc" >&5
8635 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
8636 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639   ac_check_lib_save_LIBS=$LIBS
8640 LIBS="-ldmalloc  $LIBS"
8641 cat >conftest.$ac_ext <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8644
8645 /* Override any gcc2 internal prototype to avoid an error.  */
8646 #ifdef __cplusplus
8647 extern "C"
8648 #endif
8649 /* We use char because int might match the return type of a gcc2
8650    builtin and then its argument prototype would still apply.  */
8651 char dmalloc_debug ();
8652 int
8653 main ()
8654 {
8655 dmalloc_debug ();
8656   ;
8657   return 0;
8658 }
8659 _ACEOF
8660 rm -f conftest.$ac_objext conftest$ac_exeext
8661 if { (eval echo "$as_me:8661: \"$ac_link\"") >&5
8662   (eval $ac_link) 2>&5
8663   ac_status=$?
8664   echo "$as_me:8664: \$? = $ac_status" >&5
8665   (exit $ac_status); } &&
8666          { ac_try='test -s conftest$ac_exeext'
8667   { (eval echo "$as_me:8667: \"$ac_try\"") >&5
8668   (eval $ac_try) 2>&5
8669   ac_status=$?
8670   echo "$as_me:8670: \$? = $ac_status" >&5
8671   (exit $ac_status); }; }; then
8672   ac_cv_lib_dmalloc_dmalloc_debug=yes
8673 else
8674   echo "$as_me: failed program was:" >&5
8675 cat conftest.$ac_ext >&5
8676 ac_cv_lib_dmalloc_dmalloc_debug=no
8677 fi
8678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8679 LIBS=$ac_check_lib_save_LIBS
8680 fi
8681 echo "$as_me:8681: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
8682 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
8683 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
8684   cat >>confdefs.h <<EOF
8685 #define HAVE_LIBDMALLOC 1
8686 EOF
8687
8688   LIBS="-ldmalloc $LIBS"
8689
8690 fi
8691
8692 fi
8693
8694 fi
8695
8696 echo "$as_me:8696: checking if you want to use dbmalloc for testing" >&5
8697 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
8698
8699 # Check whether --with-dbmalloc or --without-dbmalloc was given.
8700 if test "${with_dbmalloc+set}" = set; then
8701   withval="$with_dbmalloc"
8702
8703 cat >>confdefs.h <<EOF
8704 #define USE_DBMALLOC 1
8705 EOF
8706
8707         : ${with_cflags:=-g}
8708         : ${with_no_leaks:=yes}
8709          with_dbmalloc=yes
8710 else
8711   with_dbmalloc=
8712 fi;
8713 echo "$as_me:8713: result: ${with_dbmalloc:-no}" >&5
8714 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
8715
8716 case .$with_cflags in #(vi
8717 .*-g*)
8718         case .$CFLAGS in #(vi
8719         .*-g*) #(vi
8720                 ;;
8721         *)
8722
8723 cf_fix_cppflags=no
8724 cf_new_cflags=
8725 cf_new_cppflags=
8726 cf_new_extra_cppflags=
8727
8728 for cf_add_cflags in -g
8729 do
8730 case $cf_fix_cppflags in
8731 no)
8732         case $cf_add_cflags in #(vi
8733         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8734                 case $cf_add_cflags in
8735                 -D*)
8736                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8737
8738                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8739                                 && test -z "${cf_tst_cflags}" \
8740                                 && cf_fix_cppflags=yes
8741
8742                         if test $cf_fix_cppflags = yes ; then
8743                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8744                                 continue
8745                         elif test "${cf_tst_cflags}" = "\"'" ; then
8746                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8747                                 continue
8748                         fi
8749                         ;;
8750                 esac
8751                 case "$CPPFLAGS" in
8752                 *$cf_add_cflags) #(vi
8753                         ;;
8754                 *) #(vi
8755                         case $cf_add_cflags in #(vi
8756                         -D*)
8757                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8758
8759 CPPFLAGS=`echo "$CPPFLAGS" | \
8760         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8761                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8762
8763                                 ;;
8764                         esac
8765                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8766                         ;;
8767                 esac
8768                 ;;
8769         *)
8770                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8771                 ;;
8772         esac
8773         ;;
8774 yes)
8775         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8776
8777         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8778
8779         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8780                 && test -z "${cf_tst_cflags}" \
8781                 && cf_fix_cppflags=no
8782         ;;
8783 esac
8784 done
8785
8786 if test -n "$cf_new_cflags" ; then
8787
8788         CFLAGS="$CFLAGS $cf_new_cflags"
8789 fi
8790
8791 if test -n "$cf_new_cppflags" ; then
8792
8793         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8794 fi
8795
8796 if test -n "$cf_new_extra_cppflags" ; then
8797
8798         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8799 fi
8800
8801                 ;;
8802         esac
8803         ;;
8804 esac
8805
8806 if test "$with_dbmalloc" = yes ; then
8807         echo "$as_me:8807: checking for dbmalloc.h" >&5
8808 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
8809 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
8810   echo $ECHO_N "(cached) $ECHO_C" >&6
8811 else
8812   cat >conftest.$ac_ext <<_ACEOF
8813 #line 8813 "configure"
8814 #include "confdefs.h"
8815 #include <dbmalloc.h>
8816 _ACEOF
8817 if { (eval echo "$as_me:8817: \"$ac_cpp conftest.$ac_ext\"") >&5
8818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8819   ac_status=$?
8820   egrep -v '^ *\+' conftest.er1 >conftest.err
8821   rm -f conftest.er1
8822   cat conftest.err >&5
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); } >/dev/null; then
8825   if test -s conftest.err; then
8826     ac_cpp_err=$ac_c_preproc_warn_flag
8827   else
8828     ac_cpp_err=
8829   fi
8830 else
8831   ac_cpp_err=yes
8832 fi
8833 if test -z "$ac_cpp_err"; then
8834   ac_cv_header_dbmalloc_h=yes
8835 else
8836   echo "$as_me: failed program was:" >&5
8837   cat conftest.$ac_ext >&5
8838   ac_cv_header_dbmalloc_h=no
8839 fi
8840 rm -f conftest.err conftest.$ac_ext
8841 fi
8842 echo "$as_me:8842: result: $ac_cv_header_dbmalloc_h" >&5
8843 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
8844 if test $ac_cv_header_dbmalloc_h = yes; then
8845
8846 echo "$as_me:8846: checking for debug_malloc in -ldbmalloc" >&5
8847 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
8848 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
8849   echo $ECHO_N "(cached) $ECHO_C" >&6
8850 else
8851   ac_check_lib_save_LIBS=$LIBS
8852 LIBS="-ldbmalloc  $LIBS"
8853 cat >conftest.$ac_ext <<_ACEOF
8854 #line 8854 "configure"
8855 #include "confdefs.h"
8856
8857 /* Override any gcc2 internal prototype to avoid an error.  */
8858 #ifdef __cplusplus
8859 extern "C"
8860 #endif
8861 /* We use char because int might match the return type of a gcc2
8862    builtin and then its argument prototype would still apply.  */
8863 char debug_malloc ();
8864 int
8865 main ()
8866 {
8867 debug_malloc ();
8868   ;
8869   return 0;
8870 }
8871 _ACEOF
8872 rm -f conftest.$ac_objext conftest$ac_exeext
8873 if { (eval echo "$as_me:8873: \"$ac_link\"") >&5
8874   (eval $ac_link) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); } &&
8878          { ac_try='test -s conftest$ac_exeext'
8879   { (eval echo "$as_me:8879: \"$ac_try\"") >&5
8880   (eval $ac_try) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); }; }; then
8884   ac_cv_lib_dbmalloc_debug_malloc=yes
8885 else
8886   echo "$as_me: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888 ac_cv_lib_dbmalloc_debug_malloc=no
8889 fi
8890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8891 LIBS=$ac_check_lib_save_LIBS
8892 fi
8893 echo "$as_me:8893: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
8894 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
8895 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
8896   cat >>confdefs.h <<EOF
8897 #define HAVE_LIBDBMALLOC 1
8898 EOF
8899
8900   LIBS="-ldbmalloc $LIBS"
8901
8902 fi
8903
8904 fi
8905
8906 fi
8907
8908 echo "$as_me:8908: checking if you want to use purify for testing" >&5
8909 echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
8910
8911 # Check whether --with-purify or --without-purify was given.
8912 if test "${with_purify+set}" = set; then
8913   withval="$with_purify"
8914
8915 cat >>confdefs.h <<EOF
8916 #define USE_PURIFY 1
8917 EOF
8918
8919         : ${with_cflags:=-g}
8920         : ${with_no_leaks:=yes}
8921          with_purify=yes
8922 else
8923   with_purify=
8924 fi;
8925 echo "$as_me:8925: result: ${with_purify:-no}" >&5
8926 echo "${ECHO_T}${with_purify:-no}" >&6
8927
8928 case .$with_cflags in #(vi
8929 .*-g*)
8930         case .$CFLAGS in #(vi
8931         .*-g*) #(vi
8932                 ;;
8933         *)
8934
8935 cf_fix_cppflags=no
8936 cf_new_cflags=
8937 cf_new_cppflags=
8938 cf_new_extra_cppflags=
8939
8940 for cf_add_cflags in -g
8941 do
8942 case $cf_fix_cppflags in
8943 no)
8944         case $cf_add_cflags in #(vi
8945         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8946                 case $cf_add_cflags in
8947                 -D*)
8948                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8949
8950                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8951                                 && test -z "${cf_tst_cflags}" \
8952                                 && cf_fix_cppflags=yes
8953
8954                         if test $cf_fix_cppflags = yes ; then
8955                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8956                                 continue
8957                         elif test "${cf_tst_cflags}" = "\"'" ; then
8958                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8959                                 continue
8960                         fi
8961                         ;;
8962                 esac
8963                 case "$CPPFLAGS" in
8964                 *$cf_add_cflags) #(vi
8965                         ;;
8966                 *) #(vi
8967                         case $cf_add_cflags in #(vi
8968                         -D*)
8969                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8970
8971 CPPFLAGS=`echo "$CPPFLAGS" | \
8972         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8973                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8974
8975                                 ;;
8976                         esac
8977                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8978                         ;;
8979                 esac
8980                 ;;
8981         *)
8982                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8983                 ;;
8984         esac
8985         ;;
8986 yes)
8987         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8988
8989         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8990
8991         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8992                 && test -z "${cf_tst_cflags}" \
8993                 && cf_fix_cppflags=no
8994         ;;
8995 esac
8996 done
8997
8998 if test -n "$cf_new_cflags" ; then
8999
9000         CFLAGS="$CFLAGS $cf_new_cflags"
9001 fi
9002
9003 if test -n "$cf_new_cppflags" ; then
9004
9005         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9006 fi
9007
9008 if test -n "$cf_new_extra_cppflags" ; then
9009
9010         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9011 fi
9012
9013                 ;;
9014         esac
9015         ;;
9016 esac
9017
9018 echo "$as_me:9018: checking if you want to use valgrind for testing" >&5
9019 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9020
9021 # Check whether --with-valgrind or --without-valgrind was given.
9022 if test "${with_valgrind+set}" = set; then
9023   withval="$with_valgrind"
9024
9025 cat >>confdefs.h <<EOF
9026 #define USE_VALGRIND 1
9027 EOF
9028
9029         : ${with_cflags:=-g}
9030         : ${with_no_leaks:=yes}
9031          with_valgrind=yes
9032 else
9033   with_valgrind=
9034 fi;
9035 echo "$as_me:9035: result: ${with_valgrind:-no}" >&5
9036 echo "${ECHO_T}${with_valgrind:-no}" >&6
9037
9038 case .$with_cflags in #(vi
9039 .*-g*)
9040         case .$CFLAGS in #(vi
9041         .*-g*) #(vi
9042                 ;;
9043         *)
9044
9045 cf_fix_cppflags=no
9046 cf_new_cflags=
9047 cf_new_cppflags=
9048 cf_new_extra_cppflags=
9049
9050 for cf_add_cflags in -g
9051 do
9052 case $cf_fix_cppflags in
9053 no)
9054         case $cf_add_cflags in #(vi
9055         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9056                 case $cf_add_cflags in
9057                 -D*)
9058                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9059
9060                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9061                                 && test -z "${cf_tst_cflags}" \
9062                                 && cf_fix_cppflags=yes
9063
9064                         if test $cf_fix_cppflags = yes ; then
9065                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9066                                 continue
9067                         elif test "${cf_tst_cflags}" = "\"'" ; then
9068                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9069                                 continue
9070                         fi
9071                         ;;
9072                 esac
9073                 case "$CPPFLAGS" in
9074                 *$cf_add_cflags) #(vi
9075                         ;;
9076                 *) #(vi
9077                         case $cf_add_cflags in #(vi
9078                         -D*)
9079                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9080
9081 CPPFLAGS=`echo "$CPPFLAGS" | \
9082         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9083                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9084
9085                                 ;;
9086                         esac
9087                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9088                         ;;
9089                 esac
9090                 ;;
9091         *)
9092                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9093                 ;;
9094         esac
9095         ;;
9096 yes)
9097         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9098
9099         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9100
9101         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9102                 && test -z "${cf_tst_cflags}" \
9103                 && cf_fix_cppflags=no
9104         ;;
9105 esac
9106 done
9107
9108 if test -n "$cf_new_cflags" ; then
9109
9110         CFLAGS="$CFLAGS $cf_new_cflags"
9111 fi
9112
9113 if test -n "$cf_new_cppflags" ; then
9114
9115         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9116 fi
9117
9118 if test -n "$cf_new_extra_cppflags" ; then
9119
9120         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9121 fi
9122
9123                 ;;
9124         esac
9125         ;;
9126 esac
9127
9128 echo "$as_me:9128: checking if you want to perform memory-leak testing" >&5
9129 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
9130
9131 # Check whether --with-no-leaks or --without-no-leaks was given.
9132 if test "${with_no_leaks+set}" = set; then
9133   withval="$with_no_leaks"
9134
9135 cat >>confdefs.h <<\EOF
9136 #define NO_LEAKS 1
9137 EOF
9138
9139          cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
9140          case ${cf_doalloc} in #(vi
9141          *yes*) ;;
9142          *)
9143 cat >>confdefs.h <<\EOF
9144 #define DOALLOC 10000
9145 EOF
9146  ;;
9147          esac
9148          with_no_leaks=yes
9149 else
9150   with_no_leaks=
9151 fi;
9152 echo "$as_me:9152: result: $with_no_leaks" >&5
9153 echo "${ECHO_T}$with_no_leaks" >&6
9154
9155 echo "$as_me:9155: checking if you want --trace option" >&5
9156 echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
9157
9158 # Check whether --enable-trace or --disable-trace was given.
9159 if test "${enable_trace+set}" = set; then
9160   enableval="$enable_trace"
9161
9162 else
9163   enableval=yes
9164 fi;
9165 echo "$as_me:9165: result: $enableval" >&5
9166 echo "${ECHO_T}$enableval" >&6
9167 if test "$enableval" != no ; then
9168 EXTRAOBJS="$EXTRAOBJS trace\$o"
9169
9170 cat >>confdefs.h <<\EOF
9171 #define HAVE_DLG_TRACE 1
9172 EOF
9173
9174 else
9175         :
9176 fi
9177
9178 LD_RPATH_OPT=
9179 echo "$as_me:9179: checking for an rpath option" >&5
9180 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9181 case $cf_cv_system_name in #(vi
9182 irix*) #(vi
9183         if test "$GCC" = yes; then
9184                 LD_RPATH_OPT="-Wl,-rpath,"
9185         else
9186                 LD_RPATH_OPT="-rpath "
9187         fi
9188         ;;
9189 linux*|gnu*|k*bsd*-gnu) #(vi
9190         LD_RPATH_OPT="-Wl,-rpath,"
9191         ;;
9192 openbsd[2-9].*|mirbsd*) #(vi
9193         LD_RPATH_OPT="-Wl,-rpath,"
9194         ;;
9195 dragonfly*|freebsd*) #(vi
9196         LD_RPATH_OPT="-rpath "
9197         ;;
9198 netbsd*) #(vi
9199         LD_RPATH_OPT="-Wl,-rpath,"
9200         ;;
9201 osf*|mls+*) #(vi
9202         LD_RPATH_OPT="-rpath "
9203         ;;
9204 solaris2*) #(vi
9205         LD_RPATH_OPT="-R"
9206         ;;
9207 *)
9208         ;;
9209 esac
9210 echo "$as_me:9210: result: $LD_RPATH_OPT" >&5
9211 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9212
9213 case "x$LD_RPATH_OPT" in #(vi
9214 x-R*)
9215         echo "$as_me:9215: checking if we need a space after rpath option" >&5
9216 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9217         cf_save_LIBS="$LIBS"
9218         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
9219         cat >conftest.$ac_ext <<_ACEOF
9220 #line 9220 "configure"
9221 #include "confdefs.h"
9222
9223 int
9224 main ()
9225 {
9226
9227   ;
9228   return 0;
9229 }
9230 _ACEOF
9231 rm -f conftest.$ac_objext conftest$ac_exeext
9232 if { (eval echo "$as_me:9232: \"$ac_link\"") >&5
9233   (eval $ac_link) 2>&5
9234   ac_status=$?
9235   echo "$as_me:9235: \$? = $ac_status" >&5
9236   (exit $ac_status); } &&
9237          { ac_try='test -s conftest$ac_exeext'
9238   { (eval echo "$as_me:9238: \"$ac_try\"") >&5
9239   (eval $ac_try) 2>&5
9240   ac_status=$?
9241   echo "$as_me:9241: \$? = $ac_status" >&5
9242   (exit $ac_status); }; }; then
9243   cf_rpath_space=no
9244 else
9245   echo "$as_me: failed program was:" >&5
9246 cat conftest.$ac_ext >&5
9247 cf_rpath_space=yes
9248 fi
9249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9250         LIBS="$cf_save_LIBS"
9251         echo "$as_me:9251: result: $cf_rpath_space" >&5
9252 echo "${ECHO_T}$cf_rpath_space" >&6
9253         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9254         ;;
9255 esac
9256
9257 REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
9258 ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
9259 cf_cv_rel_version=$REL_VERSION
9260
9261 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
9262
9263 # Check whether --with-rel-version or --without-rel-version was given.
9264 if test "${with_rel_version+set}" = set; then
9265   withval="$with_rel_version"
9266   { echo "$as_me:9266: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
9267 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
9268  cf_cv_rel_version=$withval
9269 fi;
9270
9271  DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
9272  DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
9273
9274 if test -n "$DIALOG_MAJOR" ; then
9275   case $DIALOG_MAJOR in #(vi
9276   [0-9]*) #(vi
9277         ;;
9278   *)
9279         { { echo "$as_me:9279: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
9280 echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
9281    { (exit 1); exit 1; }; }
9282         ;;
9283   esac
9284 else
9285   { { echo "$as_me:9285: error: Release major-version value is empty" >&5
9286 echo "$as_me: error: Release major-version value is empty" >&2;}
9287    { (exit 1); exit 1; }; }
9288 fi
9289
9290 if test -n "$DIALOG_MINOR" ; then
9291   case $DIALOG_MINOR in #(vi
9292   [0-9]*) #(vi
9293         ;;
9294   *)
9295         { { echo "$as_me:9295: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
9296 echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
9297    { (exit 1); exit 1; }; }
9298         ;;
9299   esac
9300 else
9301   { { echo "$as_me:9301: error: Release minor-version value is empty" >&5
9302 echo "$as_me: error: Release minor-version value is empty" >&2;}
9303    { (exit 1); exit 1; }; }
9304 fi
9305
9306 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
9307
9308 # Check whether --with-abi-version or --without-abi-version was given.
9309 if test "${with_abi_version+set}" = set; then
9310   withval="$with_abi_version"
9311   { echo "$as_me:9311: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
9312 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
9313  cf_cv_abi_version=$withval
9314 fi;
9315
9316 if test -n "$cf_cv_abi_version" ; then
9317   case $cf_cv_abi_version in #(vi
9318   [0-9]*) #(vi
9319         ;;
9320   *)
9321         { { echo "$as_me:9321: error: ABI version is not a number: $cf_cv_abi_version" >&5
9322 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
9323    { (exit 1); exit 1; }; }
9324         ;;
9325   esac
9326 else
9327   { { echo "$as_me:9327: error: ABI version value is empty" >&5
9328 echo "$as_me: error: ABI version value is empty" >&2;}
9329    { (exit 1); exit 1; }; }
9330 fi
9331
9332 LIB_MODEL=static
9333 DFT_LWR_MODEL=$LIB_MODEL
9334 LIBTOOL_MAKE="#"
9335
9336 # use to comment-out makefile lines
9337 MAKE_NORMAL=
9338 MAKE_STATIC=
9339 MAKE_SHARED="#"
9340
9341 echo "$as_me:9341: checking if libtool -version-number should be used" >&5
9342 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
9343
9344 # Check whether --enable-libtool-version or --disable-libtool-version was given.
9345 if test "${enable_libtool_version+set}" = set; then
9346   enableval="$enable_libtool_version"
9347   test "$enableval" != no && enableval=yes
9348   if test "$enableval" != "yes" ; then
9349     cf_libtool_version=no
9350   else
9351     cf_libtool_version=yes
9352   fi
9353 else
9354   enableval=yes
9355   cf_libtool_version=yes
9356
9357 fi;
9358 echo "$as_me:9358: result: $cf_libtool_version" >&5
9359 echo "${ECHO_T}$cf_libtool_version" >&6
9360
9361 if test "$cf_libtool_version" = yes ; then
9362         LIBTOOL_VERSION="-version-number"
9363 else
9364         LIBTOOL_VERSION="-version-info"
9365 fi
9366
9367 LIBTOOL=
9368
9369 # common library maintenance symbols that are convenient for libtool scripts:
9370 LIB_CREATE='${AR} -cr'
9371 LIB_OBJECT='${OBJECTS}'
9372 LIB_SUFFIX=.a
9373 LIB_PREP="$RANLIB"
9374
9375 # symbols used to prop libtool up to enable it to determine what it should be
9376 # doing:
9377 LIB_CLEAN=
9378 LIB_COMPILE=
9379 LIB_LINK='${CC}'
9380 LIB_INSTALL=
9381 LIB_UNINSTALL=
9382
9383 echo "$as_me:9383: checking if you want to build libraries with libtool" >&5
9384 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
9385
9386 # Check whether --with-libtool or --without-libtool was given.
9387 if test "${with_libtool+set}" = set; then
9388   withval="$with_libtool"
9389   with_libtool=$withval
9390 else
9391   with_libtool=no
9392 fi;
9393 echo "$as_me:9393: result: $with_libtool" >&5
9394 echo "${ECHO_T}$with_libtool" >&6
9395 if test "$with_libtool" != "no"; then
9396
9397         if test "$with_libtool" != "yes" ; then
9398
9399 if test "x$prefix" != xNONE; then
9400   cf_path_syntax="$prefix"
9401 else
9402   cf_path_syntax="$ac_default_prefix"
9403 fi
9404
9405 case ".$with_libtool" in #(vi
9406 .\$\(*\)*|.\'*\'*) #(vi
9407   ;;
9408 ..|./*|.\\*) #(vi
9409   ;;
9410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9411   ;;
9412 .\${*prefix}*|.\${*dir}*) #(vi
9413   eval with_libtool="$with_libtool"
9414   case ".$with_libtool" in #(vi
9415   .NONE/*)
9416     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9417     ;;
9418   esac
9419   ;; #(vi
9420 .no|.NONE/*)
9421   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9422   ;;
9423 *)
9424   { { echo "$as_me:9424: error: expected a pathname, not \"$with_libtool\"" >&5
9425 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
9426    { (exit 1); exit 1; }; }
9427   ;;
9428 esac
9429
9430                 LIBTOOL=$with_libtool
9431         else
9432                 if test -n "$ac_tool_prefix"; then
9433   for ac_prog in libtool glibtool
9434   do
9435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9437 echo "$as_me:9437: checking for $ac_word" >&5
9438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9439 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
9440   echo $ECHO_N "(cached) $ECHO_C" >&6
9441 else
9442   if test -n "$LIBTOOL"; then
9443   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
9444 else
9445   ac_save_IFS=$IFS; IFS=$ac_path_separator
9446 ac_dummy="$PATH"
9447 for ac_dir in $ac_dummy; do
9448   IFS=$ac_save_IFS
9449   test -z "$ac_dir" && ac_dir=.
9450   $as_executable_p "$ac_dir/$ac_word" || continue
9451 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
9452 echo "$as_me:9452: found $ac_dir/$ac_word" >&5
9453 break
9454 done
9455
9456 fi
9457 fi
9458 LIBTOOL=$ac_cv_prog_LIBTOOL
9459 if test -n "$LIBTOOL"; then
9460   echo "$as_me:9460: result: $LIBTOOL" >&5
9461 echo "${ECHO_T}$LIBTOOL" >&6
9462 else
9463   echo "$as_me:9463: result: no" >&5
9464 echo "${ECHO_T}no" >&6
9465 fi
9466
9467     test -n "$LIBTOOL" && break
9468   done
9469 fi
9470 if test -z "$LIBTOOL"; then
9471   ac_ct_LIBTOOL=$LIBTOOL
9472   for ac_prog in libtool glibtool
9473 do
9474   # Extract the first word of "$ac_prog", so it can be a program name with args.
9475 set dummy $ac_prog; ac_word=$2
9476 echo "$as_me:9476: checking for $ac_word" >&5
9477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9478 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
9479   echo $ECHO_N "(cached) $ECHO_C" >&6
9480 else
9481   if test -n "$ac_ct_LIBTOOL"; then
9482   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
9483 else
9484   ac_save_IFS=$IFS; IFS=$ac_path_separator
9485 ac_dummy="$PATH"
9486 for ac_dir in $ac_dummy; do
9487   IFS=$ac_save_IFS
9488   test -z "$ac_dir" && ac_dir=.
9489   $as_executable_p "$ac_dir/$ac_word" || continue
9490 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
9491 echo "$as_me:9491: found $ac_dir/$ac_word" >&5
9492 break
9493 done
9494
9495 fi
9496 fi
9497 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
9498 if test -n "$ac_ct_LIBTOOL"; then
9499   echo "$as_me:9499: result: $ac_ct_LIBTOOL" >&5
9500 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
9501 else
9502   echo "$as_me:9502: result: no" >&5
9503 echo "${ECHO_T}no" >&6
9504 fi
9505
9506   test -n "$ac_ct_LIBTOOL" && break
9507 done
9508 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
9509
9510   LIBTOOL=$ac_ct_LIBTOOL
9511 fi
9512
9513 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9514 then
9515         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.].*//'`
9516 else
9517         cf_cv_libtool_version=
9518 fi
9519 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9520
9521                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
9522                 then
9523
9524 unset ac_cv_prog_ac_ct_LIBTOOL
9525 unset ac_ct_LIBTOOL
9526 unset LIBTOOL
9527
9528                         if test -n "$ac_tool_prefix"; then
9529   for ac_prog in glibtool
9530   do
9531     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9532 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9533 echo "$as_me:9533: checking for $ac_word" >&5
9534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9535 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
9536   echo $ECHO_N "(cached) $ECHO_C" >&6
9537 else
9538   if test -n "$LIBTOOL"; then
9539   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
9540 else
9541   ac_save_IFS=$IFS; IFS=$ac_path_separator
9542 ac_dummy="$PATH"
9543 for ac_dir in $ac_dummy; do
9544   IFS=$ac_save_IFS
9545   test -z "$ac_dir" && ac_dir=.
9546   $as_executable_p "$ac_dir/$ac_word" || continue
9547 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
9548 echo "$as_me:9548: found $ac_dir/$ac_word" >&5
9549 break
9550 done
9551
9552 fi
9553 fi
9554 LIBTOOL=$ac_cv_prog_LIBTOOL
9555 if test -n "$LIBTOOL"; then
9556   echo "$as_me:9556: result: $LIBTOOL" >&5
9557 echo "${ECHO_T}$LIBTOOL" >&6
9558 else
9559   echo "$as_me:9559: result: no" >&5
9560 echo "${ECHO_T}no" >&6
9561 fi
9562
9563     test -n "$LIBTOOL" && break
9564   done
9565 fi
9566 if test -z "$LIBTOOL"; then
9567   ac_ct_LIBTOOL=$LIBTOOL
9568   for ac_prog in glibtool
9569 do
9570   # Extract the first word of "$ac_prog", so it can be a program name with args.
9571 set dummy $ac_prog; ac_word=$2
9572 echo "$as_me:9572: checking for $ac_word" >&5
9573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9574 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
9575   echo $ECHO_N "(cached) $ECHO_C" >&6
9576 else
9577   if test -n "$ac_ct_LIBTOOL"; then
9578   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
9579 else
9580   ac_save_IFS=$IFS; IFS=$ac_path_separator
9581 ac_dummy="$PATH"
9582 for ac_dir in $ac_dummy; do
9583   IFS=$ac_save_IFS
9584   test -z "$ac_dir" && ac_dir=.
9585   $as_executable_p "$ac_dir/$ac_word" || continue
9586 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
9587 echo "$as_me:9587: found $ac_dir/$ac_word" >&5
9588 break
9589 done
9590
9591 fi
9592 fi
9593 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
9594 if test -n "$ac_ct_LIBTOOL"; then
9595   echo "$as_me:9595: result: $ac_ct_LIBTOOL" >&5
9596 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
9597 else
9598   echo "$as_me:9598: result: no" >&5
9599 echo "${ECHO_T}no" >&6
9600 fi
9601
9602   test -n "$ac_ct_LIBTOOL" && break
9603 done
9604 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
9605
9606   LIBTOOL=$ac_ct_LIBTOOL
9607 fi
9608
9609 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9610 then
9611         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.].*//'`
9612 else
9613         cf_cv_libtool_version=
9614 fi
9615 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9616
9617                 fi
9618         fi
9619         if test -z "$LIBTOOL" ; then
9620                 { { echo "$as_me:9620: error: Cannot find libtool" >&5
9621 echo "$as_me: error: Cannot find libtool" >&2;}
9622    { (exit 1); exit 1; }; }
9623         fi
9624         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
9625         LIB_OBJECT='${OBJECTS:.o=.lo}'
9626         LIB_SUFFIX=.la
9627         LIB_CLEAN='${LIBTOOL} --mode=clean'
9628         LIB_COMPILE='${LIBTOOL} --mode=compile'
9629         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
9630         LIB_INSTALL='${LIBTOOL} --mode=install'
9631         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
9632         LIB_PREP=:
9633
9634 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9635 then
9636         echo "$as_me:9636: checking version of $LIBTOOL" >&5
9637 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
9638
9639 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9640 then
9641         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.].*//'`
9642 else
9643         cf_cv_libtool_version=
9644 fi
9645 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9646
9647         echo "$as_me:9647: result: $cf_cv_libtool_version" >&5
9648 echo "${ECHO_T}$cf_cv_libtool_version" >&6
9649         if test -z "$cf_cv_libtool_version" ; then
9650                 { { echo "$as_me:9650: error: This is not GNU libtool" >&5
9651 echo "$as_me: error: This is not GNU libtool" >&2;}
9652    { (exit 1); exit 1; }; }
9653         fi
9654 else
9655         { { echo "$as_me:9655: error: GNU libtool has not been found" >&5
9656 echo "$as_me: error: GNU libtool has not been found" >&2;}
9657    { (exit 1); exit 1; }; }
9658 fi
9659
9660         # special hack to add -no-undefined (which libtool should do for itself)
9661         LT_UNDEF=
9662         case "$cf_cv_system_name" in #(vi
9663         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
9664                 LT_UNDEF=-no-undefined
9665                 ;;
9666         esac
9667
9668         # special hack to add --tag option for C++ compiler
9669         case $cf_cv_libtool_version in #(vi
9670         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
9671                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
9672                 LIBTOOL="$LIBTOOL --tag=CC"
9673                 ;;
9674         *)
9675                 LIBTOOL_CXX="$LIBTOOL"
9676                 ;;
9677         esac
9678 else
9679         LIBTOOL=""
9680         LIBTOOL_CXX=""
9681 fi
9682
9683 test -z "$LIBTOOL" && ECHO_LT=
9684
9685 LIB_CREATE="$LIB_CREATE \$@"
9686
9687 if test "$with_libtool" = "yes" ; then
9688         OBJEXT="lo"
9689         LIB_MODEL=libtool
9690         DFT_LWR_MODEL=$LIB_MODEL
9691         LIBTOOL_MAKE=
9692
9693 echo "$as_me:9693: checking for additional libtool options" >&5
9694 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
9695
9696 # Check whether --with-libtool-opts or --without-libtool-opts was given.
9697 if test "${with_libtool_opts+set}" = set; then
9698   withval="$with_libtool_opts"
9699   with_libtool_opts=$withval
9700 else
9701   with_libtool_opts=no
9702 fi;
9703 echo "$as_me:9703: result: $with_libtool_opts" >&5
9704 echo "${ECHO_T}$with_libtool_opts" >&6
9705
9706 case .$with_libtool_opts in
9707 .yes|.no|.)
9708         ;;
9709 *)
9710         LIBTOOL_OPTS=$with_libtool_opts
9711         ;;
9712 esac
9713
9714         MAKE_NORMAL="#"
9715         MAKE_STATIC="#"
9716         MAKE_SHARED=
9717 else
9718         echo "$as_me:9718: checking if you want to build shared libraries" >&5
9719 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
9720
9721 # Check whether --with-shared or --without-shared was given.
9722 if test "${with_shared+set}" = set; then
9723   withval="$with_shared"
9724   with_shared=$withval
9725 else
9726   with_shared=no
9727 fi;
9728         echo "$as_me:9728: result: $with_shared" >&5
9729 echo "${ECHO_T}$with_shared" >&6
9730         if test "$with_shared" = "yes" ; then
9731                 LIB_MODEL=shared
9732                 DFT_LWR_MODEL=$LIB_MODEL
9733
9734         RM_SHARED_OPTS=
9735         LOCAL_LDFLAGS=
9736         LOCAL_LDFLAGS2=
9737         LD_SHARED_OPTS=
9738         INSTALL_LIB="-m 644"
9739         : ${rel_builddir:=.}
9740
9741         cf_cv_do_symlinks=no
9742         cf_ld_rpath_opt=
9743         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9744
9745         echo "$as_me:9745: checking if release/abi version should be used for shared libs" >&5
9746 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9747
9748 # Check whether --with-shlib-version or --without-shlib-version was given.
9749 if test "${with_shlib_version+set}" = set; then
9750   withval="$with_shlib_version"
9751   test -z "$withval" && withval=auto
9752         case $withval in #(vi
9753         yes) #(vi
9754                 cf_cv_shlib_version=auto
9755                 ;;
9756         rel|abi|auto|no) #(vi
9757                 cf_cv_shlib_version=$withval
9758                 ;;
9759         *)
9760                 { { echo "$as_me:9760: error: option value must be one of: rel, abi, auto or no" >&5
9761 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
9762    { (exit 1); exit 1; }; }
9763                 ;;
9764         esac
9765
9766 else
9767   cf_cv_shlib_version=auto
9768 fi;
9769         echo "$as_me:9769: result: $cf_cv_shlib_version" >&5
9770 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9771
9772         cf_cv_rm_so_locs=no
9773         cf_try_cflags=
9774
9775         # Some less-capable ports of gcc support only -fpic
9776         CC_SHARED_OPTS=
9777         if test "$GCC" = yes
9778         then
9779                 echo "$as_me:9779: checking which $CC option to use" >&5
9780 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9781                 cf_save_CFLAGS="$CFLAGS"
9782                 for CC_SHARED_OPTS in -fPIC -fpic ''
9783                 do
9784                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9785                         cat >conftest.$ac_ext <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 #include <stdio.h>
9789 int
9790 main ()
9791 {
9792 int x = 1
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799   (eval $ac_compile) 2>&5
9800   ac_status=$?
9801   echo "$as_me:9801: \$? = $ac_status" >&5
9802   (exit $ac_status); } &&
9803          { ac_try='test -s conftest.$ac_objext'
9804   { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805   (eval $ac_try) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); }; }; then
9809   break
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest.$ac_objext conftest.$ac_ext
9815                 done
9816                 echo "$as_me:9816: result: $CC_SHARED_OPTS" >&5
9817 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9818                 CFLAGS="$cf_save_CFLAGS"
9819         fi
9820
9821         cf_cv_shlib_version_infix=no
9822
9823         case $cf_cv_system_name in #(vi
9824         aix4.3-9*|aix[5-7]*) #(vi
9825                 if test "$GCC" = yes; then
9826                         CC_SHARED_OPTS=
9827                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9828                 else
9829                         # CC_SHARED_OPTS='-qpic=large -G'
9830                         # perhaps "-bM:SRE -bnoentry -bexpall"
9831                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9832                 fi
9833                 ;;
9834         beos*) #(vi
9835                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9836                 ;;
9837         cygwin*) #(vi
9838                 CC_SHARED_OPTS=
9839                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9840                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9841                 cf_cv_shlib_version=cygdll
9842                 cf_cv_shlib_version_infix=cygdll
9843                 cat >mk_shared_lib.sh <<-CF_EOF
9844                 #!/bin/sh
9845                 SHARED_LIB=\$1
9846                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9847                 shift
9848                 cat <<-EOF
9849                 Linking shared library
9850                 ** SHARED_LIB \$SHARED_LIB
9851                 ** IMPORT_LIB \$IMPORT_LIB
9852 EOF
9853                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9854 CF_EOF
9855                 chmod +x mk_shared_lib.sh
9856                 ;;
9857         msys*) #(vi
9858                 CC_SHARED_OPTS=
9859                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9860                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9861                 cf_cv_shlib_version=msysdll
9862                 cf_cv_shlib_version_infix=msysdll
9863                 cat >mk_shared_lib.sh <<-CF_EOF
9864                 #!/bin/sh
9865                 SHARED_LIB=\$1
9866                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9867                 shift
9868                 cat <<-EOF
9869                 Linking shared library
9870                 ** SHARED_LIB \$SHARED_LIB
9871                 ** IMPORT_LIB \$IMPORT_LIB
9872 EOF
9873                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9874 CF_EOF
9875                 chmod +x mk_shared_lib.sh
9876                 ;;
9877         darwin*) #(vi
9878                 cf_try_cflags="no-cpp-precomp"
9879                 CC_SHARED_OPTS="-dynamic"
9880                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9881                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9882                 cf_cv_shlib_version_infix=yes
9883                 echo "$as_me:9883: checking if ld -search_paths_first works" >&5
9884 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9885 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9886   echo $ECHO_N "(cached) $ECHO_C" >&6
9887 else
9888
9889                         cf_save_LDFLAGS=$LDFLAGS
9890                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9891                         cat >conftest.$ac_ext <<_ACEOF
9892 #line 9892 "configure"
9893 #include "confdefs.h"
9894
9895 int
9896 main ()
9897 {
9898 int i;
9899   ;
9900   return 0;
9901 }
9902 _ACEOF
9903 rm -f conftest.$ac_objext conftest$ac_exeext
9904 if { (eval echo "$as_me:9904: \"$ac_link\"") >&5
9905   (eval $ac_link) 2>&5
9906   ac_status=$?
9907   echo "$as_me:9907: \$? = $ac_status" >&5
9908   (exit $ac_status); } &&
9909          { ac_try='test -s conftest$ac_exeext'
9910   { (eval echo "$as_me:9910: \"$ac_try\"") >&5
9911   (eval $ac_try) 2>&5
9912   ac_status=$?
9913   echo "$as_me:9913: \$? = $ac_status" >&5
9914   (exit $ac_status); }; }; then
9915   cf_cv_ldflags_search_paths_first=yes
9916 else
9917   echo "$as_me: failed program was:" >&5
9918 cat conftest.$ac_ext >&5
9919 cf_cv_ldflags_search_paths_first=no
9920 fi
9921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9922                                 LDFLAGS=$cf_save_LDFLAGS
9923 fi
9924 echo "$as_me:9924: result: $cf_cv_ldflags_search_paths_first" >&5
9925 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9926                 if test $cf_cv_ldflags_search_paths_first = yes; then
9927                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9928                 fi
9929                 ;;
9930         hpux[7-8]*) #(vi
9931                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9932                 if test "$GCC" != yes; then
9933                         CC_SHARED_OPTS='+Z'
9934                 fi
9935                 MK_SHARED_LIB='${LD} -b -o $@'
9936                 INSTALL_LIB="-m 555"
9937                 ;;
9938         hpux*) #(vi
9939                 # (tested with gcc 2.7.2 -- I don't have c89)
9940                 if test "$GCC" = yes; then
9941                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9942                 else
9943                         CC_SHARED_OPTS='+Z'
9944                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
9945                 fi
9946                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9947                 # HP-UX shared libraries must be executable, and should be
9948                 # readonly to exploit a quirk in the memory manager.
9949                 INSTALL_LIB="-m 555"
9950                 ;;
9951         interix*)
9952                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9953                 if test "$cf_cv_shlib_version" = rel; then
9954                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
9955                 else
9956                         cf_shared_soname='`basename `'
9957                 fi
9958                 CC_SHARED_OPTS=
9959                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9960                 ;;
9961         irix*) #(vi
9962                 if test "$cf_cv_enable_rpath" = yes ; then
9963                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9964                 fi
9965                 # tested with IRIX 5.2 and 'cc'.
9966                 if test "$GCC" != yes; then
9967                         CC_SHARED_OPTS='-KPIC'
9968                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9969                 else
9970                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9971                 fi
9972                 cf_cv_rm_so_locs=yes
9973                 ;;
9974         linux*|gnu*|k*bsd*-gnu) #(vi
9975                 if test "$DFT_LWR_MODEL" = "shared" ; then
9976                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9977                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9978                 fi
9979                 if test "$cf_cv_enable_rpath" = yes ; then
9980                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9981                 fi
9982
9983         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9984         if test "$cf_cv_shlib_version" = rel; then
9985                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9986         else
9987                 cf_cv_shared_soname='`basename $@`'
9988         fi
9989
9990                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9991                 ;;
9992         mingw*) #(vi
9993                 cf_cv_shlib_version=mingw
9994                 cf_cv_shlib_version_infix=mingw
9995                 if test "$DFT_LWR_MODEL" = "shared" ; then
9996                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9997                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9998                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9999                 fi
10000                 CC_SHARED_OPTS=
10001                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10002                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10003                 cat >mk_shared_lib.sh <<-CF_EOF
10004                 #!/bin/sh
10005                 SHARED_LIB=\$1
10006                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10007                 shift
10008                 cat <<-EOF
10009                 Linking shared library
10010                 ** SHARED_LIB \$SHARED_LIB
10011                 ** IMPORT_LIB \$IMPORT_LIB
10012 EOF
10013                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10014 CF_EOF
10015                 chmod +x mk_shared_lib.sh
10016                 ;;
10017         openbsd[2-9].*|mirbsd*) #(vi
10018                 if test "$DFT_LWR_MODEL" = "shared" ; then
10019                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10020                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10021                 fi
10022                 if test "$cf_cv_enable_rpath" = yes ; then
10023                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10024                 fi
10025                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10026
10027         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10028         if test "$cf_cv_shlib_version" = rel; then
10029                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10030         else
10031                 cf_cv_shared_soname='`basename $@`'
10032         fi
10033
10034                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10035                 ;;
10036         nto-qnx*|openbsd*|freebsd[12].*) #(vi
10037                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10038                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
10039                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10040                 ;;
10041         dragonfly*|freebsd*) #(vi
10042                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10043                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10044                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10045                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10046                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10047                 fi
10048
10049         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10050         if test "$cf_cv_shlib_version" = rel; then
10051                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10052         else
10053                 cf_cv_shared_soname='`basename $@`'
10054         fi
10055
10056                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
10057                 ;;
10058         netbsd*) #(vi
10059                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10060                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10061                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10062                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10063                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10064                         if test "$cf_cv_shlib_version" = auto; then
10065                         if test -f /usr/libexec/ld.elf_so; then
10066                                 cf_cv_shlib_version=abi
10067                         else
10068                                 cf_cv_shlib_version=rel
10069                         fi
10070                         fi
10071
10072         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10073         if test "$cf_cv_shlib_version" = rel; then
10074                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10075         else
10076                 cf_cv_shared_soname='`basename $@`'
10077         fi
10078
10079                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10080                 else
10081                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
10082                 fi
10083                 ;;
10084         osf*|mls+*) #(vi
10085                 # tested with OSF/1 V3.2 and 'cc'
10086                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10087                 # link with shared libs).
10088                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10089                 case $host_os in #(vi
10090                 osf4*)
10091                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10092                         ;;
10093                 esac
10094                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10095                 if test "$DFT_LWR_MODEL" = "shared" ; then
10096                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10097                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10098                 fi
10099                 cf_cv_rm_so_locs=yes
10100                 ;;
10101         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
10102                 # tested with osr5.0.5
10103                 if test "$GCC" != yes; then
10104                         CC_SHARED_OPTS='-belf -KPIC'
10105                 fi
10106                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10107                 if test "$cf_cv_enable_rpath" = yes ; then
10108                         # only way is to set LD_RUN_PATH but no switch for it
10109                         RUN_PATH=$libdir
10110                 fi
10111                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10112                 LINK_PROGS='LD_RUN_PATH=${libdir}'
10113                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10114                 ;;
10115         sunos4*) #(vi
10116                 # tested with SunOS 4.1.1 and gcc 2.7.0
10117                 if test "$GCC" != yes; then
10118                         CC_SHARED_OPTS='-KPIC'
10119                 fi
10120                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
10121                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10122                 ;;
10123         solaris2*) #(vi
10124                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10125                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10126                 if test "$DFT_LWR_MODEL" = "shared" ; then
10127                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10128                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10129                 fi
10130                 if test "$cf_cv_enable_rpath" = yes ; then
10131                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10132                 fi
10133
10134         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10135         if test "$cf_cv_shlib_version" = rel; then
10136                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10137         else
10138                 cf_cv_shared_soname='`basename $@`'
10139         fi
10140
10141                 if test "$GCC" != yes; then
10142                         cf_save_CFLAGS="$CFLAGS"
10143                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10144                         do
10145                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10146                                 cat >conftest.$ac_ext <<_ACEOF
10147 #line 10147 "configure"
10148 #include "confdefs.h"
10149 #include <stdio.h>
10150 int
10151 main ()
10152 {
10153 printf("Hello\n");
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext
10159 if { (eval echo "$as_me:10159: \"$ac_compile\"") >&5
10160   (eval $ac_compile) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); } &&
10164          { ac_try='test -s conftest.$ac_objext'
10165   { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   break
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 cat conftest.$ac_ext >&5
10174 fi
10175 rm -f conftest.$ac_objext conftest.$ac_ext
10176                         done
10177                         CFLAGS="$cf_save_CFLAGS"
10178                         CC_SHARED_OPTS=$cf_shared_opts
10179                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
10180                 else
10181                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10182                 fi
10183                 ;;
10184         sysv5uw7*|unix_sv*) #(vi
10185                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10186                 if test "$GCC" != yes; then
10187                         CC_SHARED_OPTS='-KPIC'
10188                 fi
10189                 MK_SHARED_LIB='${LD} -d y -G -o $@'
10190                 ;;
10191         *)
10192                 CC_SHARED_OPTS='unknown'
10193                 MK_SHARED_LIB='echo unknown'
10194                 ;;
10195         esac
10196
10197         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10198         case "$cf_cv_shlib_version" in #(vi
10199         rel|abi)
10200                 case "$MK_SHARED_LIB" in #(vi
10201                 *'-o $@') #(vi
10202                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10203                         ;;
10204                 *)
10205                         { echo "$as_me:10205: WARNING: ignored --with-shlib-version" >&5
10206 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10207                         ;;
10208                 esac
10209                 ;;
10210         esac
10211
10212         if test -n "$cf_try_cflags"
10213         then
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10215 "${as_me:-configure}"
10216 #include <stdio.h>
10217 int main(int argc, char *argv[])
10218 {
10219         printf("hello\n");
10220         return (argv[argc-1] == 0) ;
10221 }
10222 EOF
10223                 cf_save_CFLAGS="$CFLAGS"
10224                 for cf_opt in $cf_try_cflags
10225                 do
10226                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
10227                         echo "$as_me:10227: checking if CFLAGS option -$cf_opt works" >&5
10228 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10229                         if { (eval echo "$as_me:10229: \"$ac_compile\"") >&5
10230   (eval $ac_compile) 2>&5
10231   ac_status=$?
10232   echo "$as_me:10232: \$? = $ac_status" >&5
10233   (exit $ac_status); }; then
10234                                 echo "$as_me:10234: result: yes" >&5
10235 echo "${ECHO_T}yes" >&6
10236                                 cf_save_CFLAGS="$CFLAGS"
10237                         else
10238                                 echo "$as_me:10238: result: no" >&5
10239 echo "${ECHO_T}no" >&6
10240                         fi
10241                 done
10242                 CFLAGS="$cf_save_CFLAGS"
10243         fi
10244
10245         # RPATH_LIST is a colon-separated list of directories
10246         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10247         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10248
10249         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10250
10251         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10252
10253 echo "${as_me:-configure}:10253: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10254
10255         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
10256
10257 echo "${as_me:-configure}:10257: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
10258
10259                 LIB_PREP=:
10260                 LIB_CREATE="$MK_SHARED_LIB"
10261                 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
10262                 MAKE_NORMAL="#"
10263                 MAKE_STATIC="#"
10264                 MAKE_SHARED=
10265         fi
10266 fi
10267
10268 LIB_SUFFIX=
10269
10270         case X$LIB_MODEL in #(vi
10271         Xlibtool) #(vi
10272                 DFT_LIB_SUFFIX='.la'
10273                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10274                 ;;
10275         Xdebug) #(vi
10276                 DFT_LIB_SUFFIX='_g.a'
10277                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10278                 ;;
10279         Xprofile) #(vi
10280                 DFT_LIB_SUFFIX='_p.a'
10281                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10282                 ;;
10283         Xshared) #(vi
10284                 case $cf_cv_system_name in
10285                 aix[5-7]*) #(vi
10286                         DFT_LIB_SUFFIX='.a'
10287                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10288                         ;;
10289                 cygwin*|msys*|mingw*) #(vi
10290                         DFT_LIB_SUFFIX='.dll'
10291                         DFT_DEP_SUFFIX='.dll.a'
10292                         ;;
10293                 darwin*) #(vi
10294                         DFT_LIB_SUFFIX='.dylib'
10295                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10296                         ;;
10297                 hpux*) #(vi
10298                         case $target in
10299                         ia64*) #(vi
10300                                 DFT_LIB_SUFFIX='.so'
10301                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10302                                 ;;
10303                         *) #(vi
10304                                 DFT_LIB_SUFFIX='.sl'
10305                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10306                                 ;;
10307                         esac
10308                         ;;
10309                 *) #(vi
10310                         DFT_LIB_SUFFIX='.so'
10311                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10312                         ;;
10313                 esac
10314                 ;;
10315         *)
10316                 DFT_LIB_SUFFIX='.a'
10317                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10318                 ;;
10319         esac
10320         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
10321         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
10322
10323 LIB_SUFFIX=$DFT_LIB_SUFFIX
10324
10325 echo "$as_me:10325: checking for specific curses-directory" >&5
10326 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
10327
10328 # Check whether --with-curses-dir or --without-curses-dir was given.
10329 if test "${with_curses_dir+set}" = set; then
10330   withval="$with_curses_dir"
10331   cf_cv_curses_dir=$withval
10332 else
10333   cf_cv_curses_dir=no
10334 fi;
10335 echo "$as_me:10335: result: $cf_cv_curses_dir" >&5
10336 echo "${ECHO_T}$cf_cv_curses_dir" >&6
10337
10338 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10339 then
10340
10341 if test "x$prefix" != xNONE; then
10342   cf_path_syntax="$prefix"
10343 else
10344   cf_path_syntax="$ac_default_prefix"
10345 fi
10346
10347 case ".$withval" in #(vi
10348 .\$\(*\)*|.\'*\'*) #(vi
10349   ;;
10350 ..|./*|.\\*) #(vi
10351   ;;
10352 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10353   ;;
10354 .\${*prefix}*|.\${*dir}*) #(vi
10355   eval withval="$withval"
10356   case ".$withval" in #(vi
10357   .NONE/*)
10358     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10359     ;;
10360   esac
10361   ;; #(vi
10362 .no|.NONE/*)
10363   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10364   ;;
10365 *)
10366   { { echo "$as_me:10366: error: expected a pathname, not \"$withval\"" >&5
10367 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10368    { (exit 1); exit 1; }; }
10369   ;;
10370 esac
10371
10372         if test -d "$cf_cv_curses_dir"
10373         then
10374
10375 if test -n "$cf_cv_curses_dir/include" ; then
10376   for cf_add_incdir in $cf_cv_curses_dir/include
10377   do
10378         while test $cf_add_incdir != /usr/include
10379         do
10380           if test -d $cf_add_incdir
10381           then
10382                 cf_have_incdir=no
10383                 if test -n "$CFLAGS$CPPFLAGS" ; then
10384                   # a loop is needed to ensure we can add subdirs of existing dirs
10385                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10386                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10387                           cf_have_incdir=yes; break
10388                         fi
10389                   done
10390                 fi
10391
10392                 if test "$cf_have_incdir" = no ; then
10393                   if test "$cf_add_incdir" = /usr/local/include ; then
10394                         if test "$GCC" = yes
10395                         then
10396                           cf_save_CPPFLAGS=$CPPFLAGS
10397                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10398                           cat >conftest.$ac_ext <<_ACEOF
10399 #line 10399 "configure"
10400 #include "confdefs.h"
10401 #include <stdio.h>
10402 int
10403 main ()
10404 {
10405 printf("Hello")
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 rm -f conftest.$ac_objext
10411 if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412   (eval $ac_compile) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); } &&
10416          { ac_try='test -s conftest.$ac_objext'
10417   { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:10420: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   :
10423 else
10424   echo "$as_me: failed program was:" >&5
10425 cat conftest.$ac_ext >&5
10426 cf_have_incdir=yes
10427 fi
10428 rm -f conftest.$ac_objext conftest.$ac_ext
10429                           CPPFLAGS=$cf_save_CPPFLAGS
10430                         fi
10431                   fi
10432                 fi
10433
10434                 if test "$cf_have_incdir" = no ; then
10435                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10436
10437 echo "${as_me:-configure}:10437: testing adding $cf_add_incdir to include-path ..." 1>&5
10438
10439                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10440
10441                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10442                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10443                   cf_add_incdir="$cf_top_incdir"
10444                 else
10445                   break
10446                 fi
10447           fi
10448         done
10449   done
10450 fi
10451
10452 if test -n "$cf_cv_curses_dir/lib" ; then
10453   for cf_add_libdir in $cf_cv_curses_dir/lib
10454   do
10455     if test $cf_add_libdir = /usr/lib ; then
10456       :
10457     elif test -d $cf_add_libdir
10458     then
10459       cf_have_libdir=no
10460       if test -n "$LDFLAGS$LIBS" ; then
10461         # a loop is needed to ensure we can add subdirs of existing dirs
10462         for cf_test_libdir in $LDFLAGS $LIBS ; do
10463           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10464             cf_have_libdir=yes; break
10465           fi
10466         done
10467       fi
10468       if test "$cf_have_libdir" = no ; then
10469         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10470
10471 echo "${as_me:-configure}:10471: testing adding $cf_add_libdir to library-path ..." 1>&5
10472
10473         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10474       fi
10475     fi
10476   done
10477 fi
10478
10479         fi
10480 fi
10481
10482 echo "$as_me:10482: checking if rpath option should be used" >&5
10483 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
10484
10485 # Check whether --enable-rpath or --disable-rpath was given.
10486 if test "${enable_rpath+set}" = set; then
10487   enableval="$enable_rpath"
10488   cf_cv_enable_rpath=$enableval
10489 else
10490   cf_cv_enable_rpath=no
10491 fi;
10492 echo "$as_me:10492: result: $cf_cv_enable_rpath" >&5
10493 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
10494
10495 use_ncurses=no
10496
10497 # Check whether --with-ncurses or --without-ncurses was given.
10498 if test "${with_ncurses+set}" = set; then
10499   withval="$with_ncurses"
10500   use_ncurses=ncurses
10501 fi;
10502
10503 # Check whether --with-ncursesw or --without-ncursesw was given.
10504 if test "${with_ncursesw+set}" = set; then
10505   withval="$with_ncursesw"
10506   use_ncurses=ncursesw
10507 fi;
10508 if test $use_ncurses != no ; then
10509         cf_wide_curses=yes
10510         if test $use_ncurses = ncursesw ; then
10511
10512 echo "$as_me:10512: checking for multibyte character support" >&5
10513 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10514 if test "${cf_cv_utf8_lib+set}" = set; then
10515   echo $ECHO_N "(cached) $ECHO_C" >&6
10516 else
10517
10518         cf_save_LIBS="$LIBS"
10519         cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522
10523 #include <stdlib.h>
10524 int
10525 main ()
10526 {
10527 putwc(0,0);
10528   ;
10529   return 0;
10530 }
10531 _ACEOF
10532 rm -f conftest.$ac_objext conftest$ac_exeext
10533 if { (eval echo "$as_me:10533: \"$ac_link\"") >&5
10534   (eval $ac_link) 2>&5
10535   ac_status=$?
10536   echo "$as_me:10536: \$? = $ac_status" >&5
10537   (exit $ac_status); } &&
10538          { ac_try='test -s conftest$ac_exeext'
10539   { (eval echo "$as_me:10539: \"$ac_try\"") >&5
10540   (eval $ac_try) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit $ac_status); }; }; then
10544   cf_cv_utf8_lib=yes
10545 else
10546   echo "$as_me: failed program was:" >&5
10547 cat conftest.$ac_ext >&5
10548
10549 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10550 # will be set on completion of the AC_TRY_LINK below.
10551 cf_cv_header_path_utf8=
10552 cf_cv_library_path_utf8=
10553
10554 echo "${as_me:-configure}:10554: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10555
10556 cf_save_LIBS="$LIBS"
10557
10558 cat >conftest.$ac_ext <<_ACEOF
10559 #line 10559 "configure"
10560 #include "confdefs.h"
10561
10562 #include <libutf8.h>
10563 int
10564 main ()
10565 {
10566 putwc(0,0);
10567   ;
10568   return 0;
10569 }
10570 _ACEOF
10571 rm -f conftest.$ac_objext conftest$ac_exeext
10572 if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
10573   (eval $ac_link) 2>&5
10574   ac_status=$?
10575   echo "$as_me:10575: \$? = $ac_status" >&5
10576   (exit $ac_status); } &&
10577          { ac_try='test -s conftest$ac_exeext'
10578   { (eval echo "$as_me:10578: \"$ac_try\"") >&5
10579   (eval $ac_try) 2>&5
10580   ac_status=$?
10581   echo "$as_me:10581: \$? = $ac_status" >&5
10582   (exit $ac_status); }; }; then
10583
10584         cf_cv_find_linkage_utf8=yes
10585         cf_cv_header_path_utf8=/usr/include
10586         cf_cv_library_path_utf8=/usr/lib
10587
10588 else
10589   echo "$as_me: failed program was:" >&5
10590 cat conftest.$ac_ext >&5
10591
10592 LIBS="-lutf8  $cf_save_LIBS"
10593
10594 cat >conftest.$ac_ext <<_ACEOF
10595 #line 10595 "configure"
10596 #include "confdefs.h"
10597
10598 #include <libutf8.h>
10599 int
10600 main ()
10601 {
10602 putwc(0,0);
10603   ;
10604   return 0;
10605 }
10606 _ACEOF
10607 rm -f conftest.$ac_objext conftest$ac_exeext
10608 if { (eval echo "$as_me:10608: \"$ac_link\"") >&5
10609   (eval $ac_link) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); } &&
10613          { ac_try='test -s conftest$ac_exeext'
10614   { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615   (eval $ac_try) 2>&5
10616   ac_status=$?
10617   echo "$as_me:10617: \$? = $ac_status" >&5
10618   (exit $ac_status); }; }; then
10619
10620         cf_cv_find_linkage_utf8=yes
10621         cf_cv_header_path_utf8=/usr/include
10622         cf_cv_library_path_utf8=/usr/lib
10623         cf_cv_library_file_utf8="-lutf8"
10624
10625 else
10626   echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628
10629         cf_cv_find_linkage_utf8=no
10630         LIBS="$cf_save_LIBS"
10631
10632     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
10633
10634 echo "${as_me:-configure}:10634: testing find linkage for utf8 library ..." 1>&5
10635
10636 echo "${as_me:-configure}:10636: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10637
10638     cf_save_CPPFLAGS="$CPPFLAGS"
10639     cf_test_CPPFLAGS="$CPPFLAGS"
10640
10641 cf_search=
10642
10643 # collect the current set of include-directories from compiler flags
10644 cf_header_path_list=""
10645 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10646         for cf_header_path in $CPPFLAGS $CFLAGS
10647         do
10648                 case $cf_header_path in #(vi
10649                 -I*)
10650                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10651
10652 test "$cf_header_path" != "NONE" && \
10653 test -d "$cf_header_path" && \
10654  {
10655         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10656         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10657         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10658         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10659         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10660         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10661 }
10662
10663                         cf_header_path_list="$cf_header_path_list $cf_search"
10664                         ;;
10665                 esac
10666         done
10667 fi
10668
10669 # add the variations for the package we are looking for
10670
10671 cf_search=
10672
10673 test "/usr" != "$prefix" && \
10674 test -d "/usr" && \
10675 (test $prefix = NONE || test "/usr" != "$prefix") && {
10676         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
10677         test -d /usr/include &&          cf_search="$cf_search /usr/include"
10678         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
10679         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
10680         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
10681         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
10682 }
10683
10684 test "$prefix" != "NONE" && \
10685 test -d "$prefix" && \
10686  {
10687         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10688         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10689         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10690         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10691         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10692         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10693 }
10694
10695 test "/usr/local" != "$prefix" && \
10696 test -d "/usr/local" && \
10697 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
10698         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
10699         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
10700         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
10701         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
10702         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
10703         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
10704 }
10705
10706 test "/opt" != "$prefix" && \
10707 test -d "/opt" && \
10708 (test $prefix = NONE || test "/opt" != "$prefix") && {
10709         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
10710         test -d /opt/include &&          cf_search="$cf_search /opt/include"
10711         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
10712         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
10713         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
10714         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
10715 }
10716
10717 test "$HOME" != "$prefix" && \
10718 test -d "$HOME" && \
10719 (test $prefix = NONE || test "$HOME" != "$prefix") && {
10720         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
10721         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
10722         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
10723         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
10724         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
10725         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
10726 }
10727
10728 test "$includedir" != NONE && \
10729 test "$includedir" != "/usr/include" && \
10730 test -d "$includedir" && {
10731         test -d $includedir &&    cf_search="$cf_search $includedir"
10732         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10733 }
10734
10735 test "$oldincludedir" != NONE && \
10736 test "$oldincludedir" != "/usr/include" && \
10737 test -d "$oldincludedir" && {
10738         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10739         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10740 }
10741
10742 cf_search="$cf_search $cf_header_path_list"
10743
10744     for cf_cv_header_path_utf8 in $cf_search
10745     do
10746       if test -d $cf_cv_header_path_utf8 ; then
10747         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10748
10749 echo "${as_me:-configure}:10749: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10750
10751         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10752         cat >conftest.$ac_ext <<_ACEOF
10753 #line 10753 "configure"
10754 #include "confdefs.h"
10755
10756 #include <libutf8.h>
10757 int
10758 main ()
10759 {
10760 putwc(0,0);
10761   ;
10762   return 0;
10763 }
10764 _ACEOF
10765 rm -f conftest.$ac_objext
10766 if { (eval echo "$as_me:10766: \"$ac_compile\"") >&5
10767   (eval $ac_compile) 2>&5
10768   ac_status=$?
10769   echo "$as_me:10769: \$? = $ac_status" >&5
10770   (exit $ac_status); } &&
10771          { ac_try='test -s conftest.$ac_objext'
10772   { (eval echo "$as_me:10772: \"$ac_try\"") >&5
10773   (eval $ac_try) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); }; }; then
10777
10778             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10779
10780 echo "${as_me:-configure}:10780: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10781
10782             cf_cv_find_linkage_utf8=maybe
10783             cf_test_CPPFLAGS="$CPPFLAGS"
10784             break
10785 else
10786   echo "$as_me: failed program was:" >&5
10787 cat conftest.$ac_ext >&5
10788
10789             CPPFLAGS="$cf_save_CPPFLAGS"
10790
10791 fi
10792 rm -f conftest.$ac_objext conftest.$ac_ext
10793       fi
10794     done
10795
10796     if test "$cf_cv_find_linkage_utf8" = maybe ; then
10797
10798 echo "${as_me:-configure}:10798: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10799
10800       cf_save_LIBS="$LIBS"
10801       cf_save_LDFLAGS="$LDFLAGS"
10802
10803       if test "$cf_cv_find_linkage_utf8" != yes ; then
10804
10805 cf_search=
10806 cf_library_path_list=""
10807 if test -n "${LDFLAGS}${LIBS}" ; then
10808         for cf_library_path in $LDFLAGS $LIBS
10809         do
10810                 case $cf_library_path in #(vi
10811                 -L*)
10812                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10813
10814 test "$cf_library_path" != "NONE" && \
10815 test -d "$cf_library_path" && \
10816  {
10817         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10818         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10819         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10820         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10821         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10822         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10823 }
10824
10825                         cf_library_path_list="$cf_library_path_list $cf_search"
10826                         ;;
10827                 esac
10828         done
10829 fi
10830
10831 cf_search=
10832
10833 test "/usr" != "$prefix" && \
10834 test -d "/usr" && \
10835 (test $prefix = NONE || test "/usr" != "$prefix") && {
10836         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
10837         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
10838         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
10839         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
10840         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
10841         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
10842 }
10843
10844 test "$prefix" != "NONE" && \
10845 test -d "$prefix" && \
10846  {
10847         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10848         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10849         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10850         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10851         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10852         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10853 }
10854
10855 test "/usr/local" != "$prefix" && \
10856 test -d "/usr/local" && \
10857 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
10858         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
10859         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
10860         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
10861         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
10862         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
10863         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
10864 }
10865
10866 test "/opt" != "$prefix" && \
10867 test -d "/opt" && \
10868 (test $prefix = NONE || test "/opt" != "$prefix") && {
10869         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
10870         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
10871         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
10872         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
10873         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
10874         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
10875 }
10876
10877 test "$HOME" != "$prefix" && \
10878 test -d "$HOME" && \
10879 (test $prefix = NONE || test "$HOME" != "$prefix") && {
10880         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
10881         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
10882         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
10883         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
10884         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
10885         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
10886 }
10887
10888 cf_search="$cf_library_path_list $cf_search"
10889
10890         for cf_cv_library_path_utf8 in $cf_search
10891         do
10892           if test -d $cf_cv_library_path_utf8 ; then
10893             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
10894
10895 echo "${as_me:-configure}:10895: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10896
10897             CPPFLAGS="$cf_test_CPPFLAGS"
10898             LIBS="-lutf8  $cf_save_LIBS"
10899             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10900             cat >conftest.$ac_ext <<_ACEOF
10901 #line 10901 "configure"
10902 #include "confdefs.h"
10903
10904 #include <libutf8.h>
10905 int
10906 main ()
10907 {
10908 putwc(0,0);
10909   ;
10910   return 0;
10911 }
10912 _ACEOF
10913 rm -f conftest.$ac_objext conftest$ac_exeext
10914 if { (eval echo "$as_me:10914: \"$ac_link\"") >&5
10915   (eval $ac_link) 2>&5
10916   ac_status=$?
10917   echo "$as_me:10917: \$? = $ac_status" >&5
10918   (exit $ac_status); } &&
10919          { ac_try='test -s conftest$ac_exeext'
10920   { (eval echo "$as_me:10920: \"$ac_try\"") >&5
10921   (eval $ac_try) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit $ac_status); }; }; then
10925
10926                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10927
10928 echo "${as_me:-configure}:10928: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10929
10930                 cf_cv_find_linkage_utf8=yes
10931                 cf_cv_library_file_utf8="-lutf8"
10932                 break
10933 else
10934   echo "$as_me: failed program was:" >&5
10935 cat conftest.$ac_ext >&5
10936
10937                 CPPFLAGS="$cf_save_CPPFLAGS"
10938                 LIBS="$cf_save_LIBS"
10939                 LDFLAGS="$cf_save_LDFLAGS"
10940
10941 fi
10942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10943           fi
10944         done
10945         CPPFLAGS="$cf_save_CPPFLAGS"
10946         LDFLAGS="$cf_save_LDFLAGS"
10947       fi
10948
10949     else
10950       cf_cv_find_linkage_utf8=no
10951     fi
10952
10953 fi
10954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10955
10956 fi
10957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10958
10959 LIBS="$cf_save_LIBS"
10960
10961 if test "$cf_cv_find_linkage_utf8" = yes ; then
10962 cf_cv_utf8_lib=add-on
10963 else
10964 cf_cv_utf8_lib=no
10965 fi
10966
10967 fi
10968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10969 fi
10970 echo "$as_me:10970: result: $cf_cv_utf8_lib" >&5
10971 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10972
10973 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10974 # ncurses/ncursesw:
10975 if test "$cf_cv_utf8_lib" = "add-on" ; then
10976
10977 cat >>confdefs.h <<\EOF
10978 #define HAVE_LIBUTF8_H 1
10979 EOF
10980
10981 if test -n "$cf_cv_header_path_utf8" ; then
10982   for cf_add_incdir in $cf_cv_header_path_utf8
10983   do
10984         while test $cf_add_incdir != /usr/include
10985         do
10986           if test -d $cf_add_incdir
10987           then
10988                 cf_have_incdir=no
10989                 if test -n "$CFLAGS$CPPFLAGS" ; then
10990                   # a loop is needed to ensure we can add subdirs of existing dirs
10991                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10992                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10993                           cf_have_incdir=yes; break
10994                         fi
10995                   done
10996                 fi
10997
10998                 if test "$cf_have_incdir" = no ; then
10999                   if test "$cf_add_incdir" = /usr/local/include ; then
11000                         if test "$GCC" = yes
11001                         then
11002                           cf_save_CPPFLAGS=$CPPFLAGS
11003                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11004                           cat >conftest.$ac_ext <<_ACEOF
11005 #line 11005 "configure"
11006 #include "confdefs.h"
11007 #include <stdio.h>
11008 int
11009 main ()
11010 {
11011 printf("Hello")
11012   ;
11013   return 0;
11014 }
11015 _ACEOF
11016 rm -f conftest.$ac_objext
11017 if { (eval echo "$as_me:11017: \"$ac_compile\"") >&5
11018   (eval $ac_compile) 2>&5
11019   ac_status=$?
11020   echo "$as_me:11020: \$? = $ac_status" >&5
11021   (exit $ac_status); } &&
11022          { ac_try='test -s conftest.$ac_objext'
11023   { (eval echo "$as_me:11023: \"$ac_try\"") >&5
11024   (eval $ac_try) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit $ac_status); }; }; then
11028   :
11029 else
11030   echo "$as_me: failed program was:" >&5
11031 cat conftest.$ac_ext >&5
11032 cf_have_incdir=yes
11033 fi
11034 rm -f conftest.$ac_objext conftest.$ac_ext
11035                           CPPFLAGS=$cf_save_CPPFLAGS
11036                         fi
11037                   fi
11038                 fi
11039
11040                 if test "$cf_have_incdir" = no ; then
11041                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11042
11043 echo "${as_me:-configure}:11043: testing adding $cf_add_incdir to include-path ..." 1>&5
11044
11045                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11046
11047                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11048                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11049                   cf_add_incdir="$cf_top_incdir"
11050                 else
11051                   break
11052                 fi
11053           fi
11054         done
11055   done
11056 fi
11057
11058 if test -n "$cf_cv_library_path_utf8" ; then
11059   for cf_add_libdir in $cf_cv_library_path_utf8
11060   do
11061     if test $cf_add_libdir = /usr/lib ; then
11062       :
11063     elif test -d $cf_add_libdir
11064     then
11065       cf_have_libdir=no
11066       if test -n "$LDFLAGS$LIBS" ; then
11067         # a loop is needed to ensure we can add subdirs of existing dirs
11068         for cf_test_libdir in $LDFLAGS $LIBS ; do
11069           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11070             cf_have_libdir=yes; break
11071           fi
11072         done
11073       fi
11074       if test "$cf_have_libdir" = no ; then
11075         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11076
11077 echo "${as_me:-configure}:11077: testing adding $cf_add_libdir to library-path ..." 1>&5
11078
11079         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11080       fi
11081     fi
11082   done
11083 fi
11084
11085         LIBS="$cf_cv_library_file_utf8 $LIBS"
11086 fi
11087
11088         fi
11089
11090 cf_ncuconfig_root=$use_ncurses
11091
11092 echo "Looking for ${cf_ncuconfig_root}-config"
11093
11094 if test -n "$ac_tool_prefix"; then
11095   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11096   do
11097     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11098 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11099 echo "$as_me:11099: checking for $ac_word" >&5
11100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11101 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
11102   echo $ECHO_N "(cached) $ECHO_C" >&6
11103 else
11104   if test -n "$NCURSES_CONFIG"; then
11105   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
11106 else
11107   ac_save_IFS=$IFS; IFS=$ac_path_separator
11108 ac_dummy="$PATH"
11109 for ac_dir in $ac_dummy; do
11110   IFS=$ac_save_IFS
11111   test -z "$ac_dir" && ac_dir=.
11112   $as_executable_p "$ac_dir/$ac_word" || continue
11113 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
11114 echo "$as_me:11114: found $ac_dir/$ac_word" >&5
11115 break
11116 done
11117
11118 fi
11119 fi
11120 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
11121 if test -n "$NCURSES_CONFIG"; then
11122   echo "$as_me:11122: result: $NCURSES_CONFIG" >&5
11123 echo "${ECHO_T}$NCURSES_CONFIG" >&6
11124 else
11125   echo "$as_me:11125: result: no" >&5
11126 echo "${ECHO_T}no" >&6
11127 fi
11128
11129     test -n "$NCURSES_CONFIG" && break
11130   done
11131 fi
11132 if test -z "$NCURSES_CONFIG"; then
11133   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
11134   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11135 do
11136   # Extract the first word of "$ac_prog", so it can be a program name with args.
11137 set dummy $ac_prog; ac_word=$2
11138 echo "$as_me:11138: checking for $ac_word" >&5
11139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11140 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
11141   echo $ECHO_N "(cached) $ECHO_C" >&6
11142 else
11143   if test -n "$ac_ct_NCURSES_CONFIG"; then
11144   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
11145 else
11146   ac_save_IFS=$IFS; IFS=$ac_path_separator
11147 ac_dummy="$PATH"
11148 for ac_dir in $ac_dummy; do
11149   IFS=$ac_save_IFS
11150   test -z "$ac_dir" && ac_dir=.
11151   $as_executable_p "$ac_dir/$ac_word" || continue
11152 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
11153 echo "$as_me:11153: found $ac_dir/$ac_word" >&5
11154 break
11155 done
11156
11157 fi
11158 fi
11159 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
11160 if test -n "$ac_ct_NCURSES_CONFIG"; then
11161   echo "$as_me:11161: result: $ac_ct_NCURSES_CONFIG" >&5
11162 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
11163 else
11164   echo "$as_me:11164: result: no" >&5
11165 echo "${ECHO_T}no" >&6
11166 fi
11167
11168   test -n "$ac_ct_NCURSES_CONFIG" && break
11169 done
11170 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
11171
11172   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
11173 fi
11174
11175 if test "$NCURSES_CONFIG" != none ; then
11176
11177 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
11178 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
11179
11180 # even with config script, some packages use no-override for curses.h
11181
11182 echo "$as_me:11182: checking if we have identified curses headers" >&5
11183 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11184 if test "${cf_cv_ncurses_header+set}" = set; then
11185   echo $ECHO_N "(cached) $ECHO_C" >&6
11186 else
11187
11188 cf_cv_ncurses_header=none
11189 for cf_header in  \
11190     $use_ncurses/ncurses.h \
11191         $use_ncurses/curses.h \
11192         ncurses.h \
11193         curses.h
11194 do
11195 cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198 #include <${cf_header}>
11199 int
11200 main ()
11201 {
11202 initscr(); tgoto("?", 0,0)
11203   ;
11204   return 0;
11205 }
11206 _ACEOF
11207 rm -f conftest.$ac_objext
11208 if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
11209   (eval $ac_compile) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); } &&
11213          { ac_try='test -s conftest.$ac_objext'
11214   { (eval echo "$as_me:11214: \"$ac_try\"") >&5
11215   (eval $ac_try) 2>&5
11216   ac_status=$?
11217   echo "$as_me:11217: \$? = $ac_status" >&5
11218   (exit $ac_status); }; }; then
11219   cf_cv_ncurses_header=$cf_header; break
11220 else
11221   echo "$as_me: failed program was:" >&5
11222 cat conftest.$ac_ext >&5
11223 fi
11224 rm -f conftest.$ac_objext conftest.$ac_ext
11225 done
11226
11227 fi
11228 echo "$as_me:11228: result: $cf_cv_ncurses_header" >&5
11229 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11230
11231 if test "$cf_cv_ncurses_header" = none ; then
11232         { { echo "$as_me:11232: error: No curses header-files found" >&5
11233 echo "$as_me: error: No curses header-files found" >&2;}
11234    { (exit 1); exit 1; }; }
11235 fi
11236
11237 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11238
11239 for ac_header in $cf_cv_ncurses_header
11240 do
11241 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11242 echo "$as_me:11242: checking for $ac_header" >&5
11243 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11244 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11245   echo $ECHO_N "(cached) $ECHO_C" >&6
11246 else
11247   cat >conftest.$ac_ext <<_ACEOF
11248 #line 11248 "configure"
11249 #include "confdefs.h"
11250 #include <$ac_header>
11251 _ACEOF
11252 if { (eval echo "$as_me:11252: \"$ac_cpp conftest.$ac_ext\"") >&5
11253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11254   ac_status=$?
11255   egrep -v '^ *\+' conftest.er1 >conftest.err
11256   rm -f conftest.er1
11257   cat conftest.err >&5
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit $ac_status); } >/dev/null; then
11260   if test -s conftest.err; then
11261     ac_cpp_err=$ac_c_preproc_warn_flag
11262   else
11263     ac_cpp_err=
11264   fi
11265 else
11266   ac_cpp_err=yes
11267 fi
11268 if test -z "$ac_cpp_err"; then
11269   eval "$as_ac_Header=yes"
11270 else
11271   echo "$as_me: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   eval "$as_ac_Header=no"
11274 fi
11275 rm -f conftest.err conftest.$ac_ext
11276 fi
11277 echo "$as_me:11277: result: `eval echo '${'$as_ac_Header'}'`" >&5
11278 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11279 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11280   cat >>confdefs.h <<EOF
11281 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11282 EOF
11283
11284 fi
11285 done
11286
11287 cat >>confdefs.h <<\EOF
11288 #define NCURSES 1
11289 EOF
11290
11291 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11292
11293 cat >>confdefs.h <<EOF
11294 #define $cf_nculib_ROOT 1
11295 EOF
11296
11297 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
11298
11299 else
11300
11301 cf_ncuhdr_root=$use_ncurses
11302
11303 test -n "$cf_cv_curses_dir" && \
11304 test "$cf_cv_curses_dir" != "no" && { \
11305
11306 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11307   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11308   do
11309         while test $cf_add_incdir != /usr/include
11310         do
11311           if test -d $cf_add_incdir
11312           then
11313                 cf_have_incdir=no
11314                 if test -n "$CFLAGS$CPPFLAGS" ; then
11315                   # a loop is needed to ensure we can add subdirs of existing dirs
11316                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11317                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11318                           cf_have_incdir=yes; break
11319                         fi
11320                   done
11321                 fi
11322
11323                 if test "$cf_have_incdir" = no ; then
11324                   if test "$cf_add_incdir" = /usr/local/include ; then
11325                         if test "$GCC" = yes
11326                         then
11327                           cf_save_CPPFLAGS=$CPPFLAGS
11328                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11329                           cat >conftest.$ac_ext <<_ACEOF
11330 #line 11330 "configure"
11331 #include "confdefs.h"
11332 #include <stdio.h>
11333 int
11334 main ()
11335 {
11336 printf("Hello")
11337   ;
11338   return 0;
11339 }
11340 _ACEOF
11341 rm -f conftest.$ac_objext
11342 if { (eval echo "$as_me:11342: \"$ac_compile\"") >&5
11343   (eval $ac_compile) 2>&5
11344   ac_status=$?
11345   echo "$as_me:11345: \$? = $ac_status" >&5
11346   (exit $ac_status); } &&
11347          { ac_try='test -s conftest.$ac_objext'
11348   { (eval echo "$as_me:11348: \"$ac_try\"") >&5
11349   (eval $ac_try) 2>&5
11350   ac_status=$?
11351   echo "$as_me:11351: \$? = $ac_status" >&5
11352   (exit $ac_status); }; }; then
11353   :
11354 else
11355   echo "$as_me: failed program was:" >&5
11356 cat conftest.$ac_ext >&5
11357 cf_have_incdir=yes
11358 fi
11359 rm -f conftest.$ac_objext conftest.$ac_ext
11360                           CPPFLAGS=$cf_save_CPPFLAGS
11361                         fi
11362                   fi
11363                 fi
11364
11365                 if test "$cf_have_incdir" = no ; then
11366                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11367
11368 echo "${as_me:-configure}:11368: testing adding $cf_add_incdir to include-path ..." 1>&5
11369
11370                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11371
11372                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11373                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11374                   cf_add_incdir="$cf_top_incdir"
11375                 else
11376                   break
11377                 fi
11378           fi
11379         done
11380   done
11381 fi
11382
11383 }
11384
11385 echo "$as_me:11385: checking for $cf_ncuhdr_root header in include-path" >&5
11386 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11387 if test "${cf_cv_ncurses_h+set}" = set; then
11388   echo $ECHO_N "(cached) $ECHO_C" >&6
11389 else
11390
11391         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11392         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
11393         for cf_header in $cf_header_list
11394         do
11395
11396         cat >conftest.$ac_ext <<_ACEOF
11397 #line 11397 "configure"
11398 #include "confdefs.h"
11399
11400 #include <$cf_header>
11401 int
11402 main ()
11403 {
11404
11405 #ifdef NCURSES_VERSION
11406
11407 printf("%s\n", NCURSES_VERSION);
11408 #else
11409 #ifdef __NCURSES_H
11410 printf("old\n");
11411 #else
11412         make an error
11413 #endif
11414 #endif
11415
11416   ;
11417   return 0;
11418 }
11419 _ACEOF
11420 rm -f conftest.$ac_objext
11421 if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
11422   (eval $ac_compile) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit $ac_status); } &&
11426          { ac_try='test -s conftest.$ac_objext'
11427   { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428   (eval $ac_try) 2>&5
11429   ac_status=$?
11430   echo "$as_me:11430: \$? = $ac_status" >&5
11431   (exit $ac_status); }; }; then
11432   cf_cv_ncurses_h=$cf_header
11433
11434 else
11435   echo "$as_me: failed program was:" >&5
11436 cat conftest.$ac_ext >&5
11437 cf_cv_ncurses_h=no
11438 fi
11439 rm -f conftest.$ac_objext conftest.$ac_ext
11440
11441                 test "$cf_cv_ncurses_h" != no && break
11442         done
11443
11444 fi
11445 echo "$as_me:11445: result: $cf_cv_ncurses_h" >&5
11446 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11447
11448 if test "$cf_cv_ncurses_h" != no ; then
11449         cf_cv_ncurses_header=$cf_cv_ncurses_h
11450 else
11451
11452 echo "$as_me:11452: checking for $cf_ncuhdr_root include-path" >&5
11453 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11454 if test "${cf_cv_ncurses_h2+set}" = set; then
11455   echo $ECHO_N "(cached) $ECHO_C" >&6
11456 else
11457
11458         test -n "$verbose" && echo
11459
11460 cf_search=
11461
11462 # collect the current set of include-directories from compiler flags
11463 cf_header_path_list=""
11464 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11465         for cf_header_path in $CPPFLAGS $CFLAGS
11466         do
11467                 case $cf_header_path in #(vi
11468                 -I*)
11469                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11470
11471 test "$cf_header_path" != "NONE" && \
11472 test -d "$cf_header_path" && \
11473  {
11474         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11475         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11476         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11477         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11478         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11479         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"
11480 }
11481
11482                         cf_header_path_list="$cf_header_path_list $cf_search"
11483                         ;;
11484                 esac
11485         done
11486 fi
11487
11488 # add the variations for the package we are looking for
11489
11490 cf_search=
11491
11492 test "/usr" != "$prefix" && \
11493 test -d "/usr" && \
11494 (test $prefix = NONE || test "/usr" != "$prefix") && {
11495         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
11496         test -d /usr/include &&          cf_search="$cf_search /usr/include"
11497         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
11498         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
11499         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
11500         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11501 }
11502
11503 test "$prefix" != "NONE" && \
11504 test -d "$prefix" && \
11505  {
11506         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11507         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11508         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11509         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11510         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11511         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11512 }
11513
11514 test "/usr/local" != "$prefix" && \
11515 test -d "/usr/local" && \
11516 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
11517         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
11518         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
11519         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
11520         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
11521         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
11522         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11523 }
11524
11525 test "/opt" != "$prefix" && \
11526 test -d "/opt" && \
11527 (test $prefix = NONE || test "/opt" != "$prefix") && {
11528         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
11529         test -d /opt/include &&          cf_search="$cf_search /opt/include"
11530         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
11531         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
11532         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
11533         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11534 }
11535
11536 test "$HOME" != "$prefix" && \
11537 test -d "$HOME" && \
11538 (test $prefix = NONE || test "$HOME" != "$prefix") && {
11539         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
11540         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
11541         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
11542         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
11543         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
11544         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11545 }
11546
11547 test "$includedir" != NONE && \
11548 test "$includedir" != "/usr/include" && \
11549 test -d "$includedir" && {
11550         test -d $includedir &&    cf_search="$cf_search $includedir"
11551         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11552 }
11553
11554 test "$oldincludedir" != NONE && \
11555 test "$oldincludedir" != "/usr/include" && \
11556 test -d "$oldincludedir" && {
11557         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11558         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11559 }
11560
11561 cf_search="$cf_search $cf_header_path_list"
11562
11563         test -n "$verbose" && echo search path $cf_search
11564         cf_save2_CPPFLAGS="$CPPFLAGS"
11565         for cf_incdir in $cf_search
11566         do
11567
11568 if test -n "$cf_incdir" ; then
11569   for cf_add_incdir in $cf_incdir
11570   do
11571         while test $cf_add_incdir != /usr/include
11572         do
11573           if test -d $cf_add_incdir
11574           then
11575                 cf_have_incdir=no
11576                 if test -n "$CFLAGS$CPPFLAGS" ; then
11577                   # a loop is needed to ensure we can add subdirs of existing dirs
11578                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11579                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11580                           cf_have_incdir=yes; break
11581                         fi
11582                   done
11583                 fi
11584
11585                 if test "$cf_have_incdir" = no ; then
11586                   if test "$cf_add_incdir" = /usr/local/include ; then
11587                         if test "$GCC" = yes
11588                         then
11589                           cf_save_CPPFLAGS=$CPPFLAGS
11590                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11591                           cat >conftest.$ac_ext <<_ACEOF
11592 #line 11592 "configure"
11593 #include "confdefs.h"
11594 #include <stdio.h>
11595 int
11596 main ()
11597 {
11598 printf("Hello")
11599   ;
11600   return 0;
11601 }
11602 _ACEOF
11603 rm -f conftest.$ac_objext
11604 if { (eval echo "$as_me:11604: \"$ac_compile\"") >&5
11605   (eval $ac_compile) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit $ac_status); } &&
11609          { ac_try='test -s conftest.$ac_objext'
11610   { (eval echo "$as_me:11610: \"$ac_try\"") >&5
11611   (eval $ac_try) 2>&5
11612   ac_status=$?
11613   echo "$as_me:11613: \$? = $ac_status" >&5
11614   (exit $ac_status); }; }; then
11615   :
11616 else
11617   echo "$as_me: failed program was:" >&5
11618 cat conftest.$ac_ext >&5
11619 cf_have_incdir=yes
11620 fi
11621 rm -f conftest.$ac_objext conftest.$ac_ext
11622                           CPPFLAGS=$cf_save_CPPFLAGS
11623                         fi
11624                   fi
11625                 fi
11626
11627                 if test "$cf_have_incdir" = no ; then
11628                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11629
11630 echo "${as_me:-configure}:11630: testing adding $cf_add_incdir to include-path ..." 1>&5
11631
11632                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11633
11634                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11635                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11636                   cf_add_incdir="$cf_top_incdir"
11637                 else
11638                   break
11639                 fi
11640           fi
11641         done
11642   done
11643 fi
11644
11645                 for cf_header in \
11646                         ncurses.h \
11647                         curses.h
11648                 do
11649
11650         cat >conftest.$ac_ext <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653
11654 #include <$cf_header>
11655 int
11656 main ()
11657 {
11658
11659 #ifdef NCURSES_VERSION
11660
11661 printf("%s\n", NCURSES_VERSION);
11662 #else
11663 #ifdef __NCURSES_H
11664 printf("old\n");
11665 #else
11666         make an error
11667 #endif
11668 #endif
11669
11670   ;
11671   return 0;
11672 }
11673 _ACEOF
11674 rm -f conftest.$ac_objext
11675 if { (eval echo "$as_me:11675: \"$ac_compile\"") >&5
11676   (eval $ac_compile) 2>&5
11677   ac_status=$?
11678   echo "$as_me:11678: \$? = $ac_status" >&5
11679   (exit $ac_status); } &&
11680          { ac_try='test -s conftest.$ac_objext'
11681   { (eval echo "$as_me:11681: \"$ac_try\"") >&5
11682   (eval $ac_try) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); }; }; then
11686   cf_cv_ncurses_h2=$cf_header
11687
11688 else
11689   echo "$as_me: failed program was:" >&5
11690 cat conftest.$ac_ext >&5
11691 cf_cv_ncurses_h2=no
11692 fi
11693 rm -f conftest.$ac_objext conftest.$ac_ext
11694
11695                         if test "$cf_cv_ncurses_h2" != no ; then
11696                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11697                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
11698                                 break
11699                         fi
11700                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
11701                 done
11702                 CPPFLAGS="$cf_save2_CPPFLAGS"
11703                 test "$cf_cv_ncurses_h2" != no && break
11704         done
11705         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11705: error: not found" >&5
11706 echo "$as_me: error: not found" >&2;}
11707    { (exit 1); exit 1; }; }
11708
11709 fi
11710 echo "$as_me:11710: result: $cf_cv_ncurses_h2" >&5
11711 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11712
11713         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
11714         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
11715         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
11716                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
11717         fi
11718
11719 if test -n "$cf_1st_incdir" ; then
11720   for cf_add_incdir in $cf_1st_incdir
11721   do
11722         while test $cf_add_incdir != /usr/include
11723         do
11724           if test -d $cf_add_incdir
11725           then
11726                 cf_have_incdir=no
11727                 if test -n "$CFLAGS$CPPFLAGS" ; then
11728                   # a loop is needed to ensure we can add subdirs of existing dirs
11729                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11730                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11731                           cf_have_incdir=yes; break
11732                         fi
11733                   done
11734                 fi
11735
11736                 if test "$cf_have_incdir" = no ; then
11737                   if test "$cf_add_incdir" = /usr/local/include ; then
11738                         if test "$GCC" = yes
11739                         then
11740                           cf_save_CPPFLAGS=$CPPFLAGS
11741                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11742                           cat >conftest.$ac_ext <<_ACEOF
11743 #line 11743 "configure"
11744 #include "confdefs.h"
11745 #include <stdio.h>
11746 int
11747 main ()
11748 {
11749 printf("Hello")
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f conftest.$ac_objext
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); } &&
11760          { ac_try='test -s conftest.$ac_objext'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); }; }; then
11766   :
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat conftest.$ac_ext >&5
11770 cf_have_incdir=yes
11771 fi
11772 rm -f conftest.$ac_objext conftest.$ac_ext
11773                           CPPFLAGS=$cf_save_CPPFLAGS
11774                         fi
11775                   fi
11776                 fi
11777
11778                 if test "$cf_have_incdir" = no ; then
11779                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11780
11781 echo "${as_me:-configure}:11781: testing adding $cf_add_incdir to include-path ..." 1>&5
11782
11783                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11784
11785                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11786                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11787                   cf_add_incdir="$cf_top_incdir"
11788                 else
11789                   break
11790                 fi
11791           fi
11792         done
11793   done
11794 fi
11795
11796 fi
11797
11798 # Set definitions to allow ifdef'ing for ncurses.h
11799
11800 case $cf_cv_ncurses_header in # (vi
11801 *ncurses.h)
11802
11803 cat >>confdefs.h <<\EOF
11804 #define HAVE_NCURSES_H 1
11805 EOF
11806
11807         ;;
11808 esac
11809
11810 case $cf_cv_ncurses_header in # (vi
11811 ncurses/curses.h|ncurses/ncurses.h)
11812
11813 cat >>confdefs.h <<\EOF
11814 #define HAVE_NCURSES_NCURSES_H 1
11815 EOF
11816
11817         ;;
11818 ncursesw/curses.h|ncursesw/ncurses.h)
11819
11820 cat >>confdefs.h <<\EOF
11821 #define HAVE_NCURSESW_NCURSES_H 1
11822 EOF
11823
11824         ;;
11825 esac
11826
11827 echo "$as_me:11827: checking for terminfo header" >&5
11828 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11829 if test "${cf_cv_term_header+set}" = set; then
11830   echo $ECHO_N "(cached) $ECHO_C" >&6
11831 else
11832
11833 case ${cf_cv_ncurses_header} in #(vi
11834 */ncurses.h|*/ncursesw.h) #(vi
11835         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11836         ;;
11837 *)
11838         cf_term_header=term.h
11839         ;;
11840 esac
11841
11842 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11843 do
11844 cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847 #include <stdio.h>
11848 #include <${cf_cv_ncurses_header:-curses.h}>
11849 #include <$cf_test>
11850
11851 int
11852 main ()
11853 {
11854 int x = auto_left_margin
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext
11860 if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
11861   (eval $ac_compile) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest.$ac_objext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871
11872         cf_cv_term_header="$cf_test"
11873 else
11874   echo "$as_me: failed program was:" >&5
11875 cat conftest.$ac_ext >&5
11876
11877         cf_cv_term_header=unknown
11878
11879 fi
11880 rm -f conftest.$ac_objext conftest.$ac_ext
11881         test "$cf_cv_term_header" != unknown && break
11882 done
11883
11884 fi
11885 echo "$as_me:11885: result: $cf_cv_term_header" >&5
11886 echo "${ECHO_T}$cf_cv_term_header" >&6
11887
11888 # Set definitions to allow ifdef'ing to accommodate subdirectories
11889
11890 case $cf_cv_term_header in # (vi
11891 *term.h)
11892
11893 cat >>confdefs.h <<\EOF
11894 #define HAVE_TERM_H 1
11895 EOF
11896
11897         ;;
11898 esac
11899
11900 case $cf_cv_term_header in # (vi
11901 ncurses/term.h) #(vi
11902
11903 cat >>confdefs.h <<\EOF
11904 #define HAVE_NCURSES_TERM_H 1
11905 EOF
11906
11907         ;;
11908 ncursesw/term.h)
11909
11910 cat >>confdefs.h <<\EOF
11911 #define HAVE_NCURSESW_TERM_H 1
11912 EOF
11913
11914         ;;
11915 esac
11916
11917 # some applications need this, but should check for NCURSES_VERSION
11918
11919 cat >>confdefs.h <<\EOF
11920 #define NCURSES 1
11921 EOF
11922
11923 echo "$as_me:11923: checking for ncurses version" >&5
11924 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11925 if test "${cf_cv_ncurses_version+set}" = set; then
11926   echo $ECHO_N "(cached) $ECHO_C" >&6
11927 else
11928
11929         cf_cv_ncurses_version=no
11930         cf_tempfile=out$$
11931         rm -f $cf_tempfile
11932         if test "$cross_compiling" = yes; then
11933
11934         # This will not work if the preprocessor splits the line after the
11935         # Autoconf token.  The 'unproto' program does that.
11936         cat > conftest.$ac_ext <<EOF
11937 #include <${cf_cv_ncurses_header:-curses.h}>
11938 #undef Autoconf
11939 #ifdef NCURSES_VERSION
11940 Autoconf NCURSES_VERSION
11941 #else
11942 #ifdef __NCURSES_H
11943 Autoconf "old"
11944 #endif
11945 ;
11946 #endif
11947 EOF
11948         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11949         { (eval echo "$as_me:11949: \"$cf_try\"") >&5
11950   (eval $cf_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }
11954         if test -f conftest.out ; then
11955                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11956                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11957                 rm -f conftest.out
11958         fi
11959
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 #line 11962 "configure"
11963 #include "confdefs.h"
11964
11965 #include <${cf_cv_ncurses_header:-curses.h}>
11966 #include <stdio.h>
11967 int main()
11968 {
11969         FILE *fp = fopen("$cf_tempfile", "w");
11970 #ifdef NCURSES_VERSION
11971 # ifdef NCURSES_VERSION_PATCH
11972         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11973 # else
11974         fprintf(fp, "%s\n", NCURSES_VERSION);
11975 # endif
11976 #else
11977 # ifdef __NCURSES_H
11978         fprintf(fp, "old\n");
11979 # else
11980         make an error
11981 # endif
11982 #endif
11983         ${cf_cv_main_return:-return}(0);
11984 }
11985 _ACEOF
11986 rm -f conftest$ac_exeext
11987 if { (eval echo "$as_me:11987: \"$ac_link\"") >&5
11988   (eval $ac_link) 2>&5
11989   ac_status=$?
11990   echo "$as_me:11990: \$? = $ac_status" >&5
11991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11992   { (eval echo "$as_me:11992: \"$ac_try\"") >&5
11993   (eval $ac_try) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit $ac_status); }; }; then
11997
11998         cf_cv_ncurses_version=`cat $cf_tempfile`
11999 else
12000   echo "$as_me: program exited with status $ac_status" >&5
12001 echo "$as_me: failed program was:" >&5
12002 cat conftest.$ac_ext >&5
12003 fi
12004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12005 fi
12006         rm -f $cf_tempfile
12007
12008 fi
12009 echo "$as_me:12009: result: $cf_cv_ncurses_version" >&5
12010 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12011 test "$cf_cv_ncurses_version" = no ||
12012 cat >>confdefs.h <<\EOF
12013 #define NCURSES 1
12014 EOF
12015
12016 cf_nculib_root=$use_ncurses
12017         # This works, except for the special case where we find gpm, but
12018         # ncurses is in a nonstandard location via $LIBS, and we really want
12019         # to link gpm.
12020 cf_ncurses_LIBS=""
12021 cf_ncurses_SAVE="$LIBS"
12022 echo "$as_me:12022: checking for Gpm_Open in -lgpm" >&5
12023 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
12024 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
12025   echo $ECHO_N "(cached) $ECHO_C" >&6
12026 else
12027   ac_check_lib_save_LIBS=$LIBS
12028 LIBS="-lgpm  $LIBS"
12029 cat >conftest.$ac_ext <<_ACEOF
12030 #line 12030 "configure"
12031 #include "confdefs.h"
12032
12033 /* Override any gcc2 internal prototype to avoid an error.  */
12034 #ifdef __cplusplus
12035 extern "C"
12036 #endif
12037 /* We use char because int might match the return type of a gcc2
12038    builtin and then its argument prototype would still apply.  */
12039 char Gpm_Open ();
12040 int
12041 main ()
12042 {
12043 Gpm_Open ();
12044   ;
12045   return 0;
12046 }
12047 _ACEOF
12048 rm -f conftest.$ac_objext conftest$ac_exeext
12049 if { (eval echo "$as_me:12049: \"$ac_link\"") >&5
12050   (eval $ac_link) 2>&5
12051   ac_status=$?
12052   echo "$as_me:12052: \$? = $ac_status" >&5
12053   (exit $ac_status); } &&
12054          { ac_try='test -s conftest$ac_exeext'
12055   { (eval echo "$as_me:12055: \"$ac_try\"") >&5
12056   (eval $ac_try) 2>&5
12057   ac_status=$?
12058   echo "$as_me:12058: \$? = $ac_status" >&5
12059   (exit $ac_status); }; }; then
12060   ac_cv_lib_gpm_Gpm_Open=yes
12061 else
12062   echo "$as_me: failed program was:" >&5
12063 cat conftest.$ac_ext >&5
12064 ac_cv_lib_gpm_Gpm_Open=no
12065 fi
12066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12067 LIBS=$ac_check_lib_save_LIBS
12068 fi
12069 echo "$as_me:12069: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12070 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
12071 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
12072   echo "$as_me:12072: checking for initscr in -lgpm" >&5
12073 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
12074 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
12075   echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077   ac_check_lib_save_LIBS=$LIBS
12078 LIBS="-lgpm  $LIBS"
12079 cat >conftest.$ac_ext <<_ACEOF
12080 #line 12080 "configure"
12081 #include "confdefs.h"
12082
12083 /* Override any gcc2 internal prototype to avoid an error.  */
12084 #ifdef __cplusplus
12085 extern "C"
12086 #endif
12087 /* We use char because int might match the return type of a gcc2
12088    builtin and then its argument prototype would still apply.  */
12089 char initscr ();
12090 int
12091 main ()
12092 {
12093 initscr ();
12094   ;
12095   return 0;
12096 }
12097 _ACEOF
12098 rm -f conftest.$ac_objext conftest$ac_exeext
12099 if { (eval echo "$as_me:12099: \"$ac_link\"") >&5
12100   (eval $ac_link) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); } &&
12104          { ac_try='test -s conftest$ac_exeext'
12105   { (eval echo "$as_me:12105: \"$ac_try\"") >&5
12106   (eval $ac_try) 2>&5
12107   ac_status=$?
12108   echo "$as_me:12108: \$? = $ac_status" >&5
12109   (exit $ac_status); }; }; then
12110   ac_cv_lib_gpm_initscr=yes
12111 else
12112   echo "$as_me: failed program was:" >&5
12113 cat conftest.$ac_ext >&5
12114 ac_cv_lib_gpm_initscr=no
12115 fi
12116 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12117 LIBS=$ac_check_lib_save_LIBS
12118 fi
12119 echo "$as_me:12119: result: $ac_cv_lib_gpm_initscr" >&5
12120 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
12121 if test $ac_cv_lib_gpm_initscr = yes; then
12122   LIBS="$cf_ncurses_SAVE"
12123 else
12124   cf_ncurses_LIBS="-lgpm"
12125 fi
12126
12127 fi
12128
12129 case $host_os in #(vi
12130 freebsd*)
12131         # This is only necessary if you are linking against an obsolete
12132         # version of ncurses (but it should do no harm, since it's static).
12133         if test "$cf_nculib_root" = ncurses ; then
12134                 echo "$as_me:12134: checking for tgoto in -lmytinfo" >&5
12135 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12136 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12137   echo $ECHO_N "(cached) $ECHO_C" >&6
12138 else
12139   ac_check_lib_save_LIBS=$LIBS
12140 LIBS="-lmytinfo  $LIBS"
12141 cat >conftest.$ac_ext <<_ACEOF
12142 #line 12142 "configure"
12143 #include "confdefs.h"
12144
12145 /* Override any gcc2 internal prototype to avoid an error.  */
12146 #ifdef __cplusplus
12147 extern "C"
12148 #endif
12149 /* We use char because int might match the return type of a gcc2
12150    builtin and then its argument prototype would still apply.  */
12151 char tgoto ();
12152 int
12153 main ()
12154 {
12155 tgoto ();
12156   ;
12157   return 0;
12158 }
12159 _ACEOF
12160 rm -f conftest.$ac_objext conftest$ac_exeext
12161 if { (eval echo "$as_me:12161: \"$ac_link\"") >&5
12162   (eval $ac_link) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); } &&
12166          { ac_try='test -s conftest$ac_exeext'
12167   { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168   (eval $ac_try) 2>&5
12169   ac_status=$?
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); }; }; then
12172   ac_cv_lib_mytinfo_tgoto=yes
12173 else
12174   echo "$as_me: failed program was:" >&5
12175 cat conftest.$ac_ext >&5
12176 ac_cv_lib_mytinfo_tgoto=no
12177 fi
12178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12179 LIBS=$ac_check_lib_save_LIBS
12180 fi
12181 echo "$as_me:12181: result: $ac_cv_lib_mytinfo_tgoto" >&5
12182 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12183 if test $ac_cv_lib_mytinfo_tgoto = yes; then
12184   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12185 fi
12186
12187         fi
12188         ;;
12189 esac
12190
12191 LIBS="$cf_ncurses_LIBS $LIBS"
12192
12193 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
12194 then
12195         LIBS="-l$cf_nculib_root $LIBS"
12196 else
12197
12198         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
12199         cf_libdir=""
12200         echo "$as_me:12200: checking for initscr" >&5
12201 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12202 if test "${ac_cv_func_initscr+set}" = set; then
12203   echo $ECHO_N "(cached) $ECHO_C" >&6
12204 else
12205   cat >conftest.$ac_ext <<_ACEOF
12206 #line 12206 "configure"
12207 #include "confdefs.h"
12208 /* System header to define __stub macros and hopefully few prototypes,
12209     which can conflict with char initscr (); below.  */
12210 #include <assert.h>
12211 /* Override any gcc2 internal prototype to avoid an error.  */
12212 #ifdef __cplusplus
12213 extern "C"
12214 #endif
12215 /* We use char because int might match the return type of a gcc2
12216    builtin and then its argument prototype would still apply.  */
12217 char initscr ();
12218 char (*f) ();
12219
12220 int
12221 main ()
12222 {
12223 /* The GNU C library defines this for functions which it implements
12224     to always fail with ENOSYS.  Some functions are actually named
12225     something starting with __ and the normal name is an alias.  */
12226 #if defined (__stub_initscr) || defined (__stub___initscr)
12227 choke me
12228 #else
12229 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12230 #endif
12231
12232   ;
12233   return 0;
12234 }
12235 _ACEOF
12236 rm -f conftest.$ac_objext conftest$ac_exeext
12237 if { (eval echo "$as_me:12237: \"$ac_link\"") >&5
12238   (eval $ac_link) 2>&5
12239   ac_status=$?
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit $ac_status); } &&
12242          { ac_try='test -s conftest$ac_exeext'
12243   { (eval echo "$as_me:12243: \"$ac_try\"") >&5
12244   (eval $ac_try) 2>&5
12245   ac_status=$?
12246   echo "$as_me:12246: \$? = $ac_status" >&5
12247   (exit $ac_status); }; }; then
12248   ac_cv_func_initscr=yes
12249 else
12250   echo "$as_me: failed program was:" >&5
12251 cat conftest.$ac_ext >&5
12252 ac_cv_func_initscr=no
12253 fi
12254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12255 fi
12256 echo "$as_me:12256: result: $ac_cv_func_initscr" >&5
12257 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12258 if test $ac_cv_func_initscr = yes; then
12259   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12260 else
12261
12262                 cf_save_LIBS="$LIBS"
12263                 echo "$as_me:12263: checking for initscr in -l$cf_nculib_root" >&5
12264 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12265                 LIBS="-l$cf_nculib_root $LIBS"
12266                 cat >conftest.$ac_ext <<_ACEOF
12267 #line 12267 "configure"
12268 #include "confdefs.h"
12269 #include <${cf_cv_ncurses_header:-curses.h}>
12270 int
12271 main ()
12272 {
12273 initscr()
12274   ;
12275   return 0;
12276 }
12277 _ACEOF
12278 rm -f conftest.$ac_objext conftest$ac_exeext
12279 if { (eval echo "$as_me:12279: \"$ac_link\"") >&5
12280   (eval $ac_link) 2>&5
12281   ac_status=$?
12282   echo "$as_me:12282: \$? = $ac_status" >&5
12283   (exit $ac_status); } &&
12284          { ac_try='test -s conftest$ac_exeext'
12285   { (eval echo "$as_me:12285: \"$ac_try\"") >&5
12286   (eval $ac_try) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); }; }; then
12290   echo "$as_me:12290: result: yes" >&5
12291 echo "${ECHO_T}yes" >&6
12292                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12293
12294 else
12295   echo "$as_me: failed program was:" >&5
12296 cat conftest.$ac_ext >&5
12297 echo "$as_me:12297: result: no" >&5
12298 echo "${ECHO_T}no" >&6
12299
12300 cf_search=
12301 cf_library_path_list=""
12302 if test -n "${LDFLAGS}${LIBS}" ; then
12303         for cf_library_path in $LDFLAGS $LIBS
12304         do
12305                 case $cf_library_path in #(vi
12306                 -L*)
12307                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12308
12309 test "$cf_library_path" != "NONE" && \
12310 test -d "$cf_library_path" && \
12311  {
12312         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12313         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12314         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12315         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12316         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12317         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"
12318 }
12319
12320                         cf_library_path_list="$cf_library_path_list $cf_search"
12321                         ;;
12322                 esac
12323         done
12324 fi
12325
12326 cf_search=
12327
12328 test "/usr" != "$prefix" && \
12329 test -d "/usr" && \
12330 (test $prefix = NONE || test "/usr" != "$prefix") && {
12331         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
12332         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
12333         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
12334         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
12335         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
12336         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
12337 }
12338
12339 test "$prefix" != "NONE" && \
12340 test -d "$prefix" && \
12341  {
12342         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12343         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12344         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12345         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12346         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12347         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12348 }
12349
12350 test "/usr/local" != "$prefix" && \
12351 test -d "/usr/local" && \
12352 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
12353         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
12354         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
12355         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
12356         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
12357         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
12358         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
12359 }
12360
12361 test "/opt" != "$prefix" && \
12362 test -d "/opt" && \
12363 (test $prefix = NONE || test "/opt" != "$prefix") && {
12364         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
12365         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
12366         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
12367         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
12368         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
12369         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
12370 }
12371
12372 test "$HOME" != "$prefix" && \
12373 test -d "$HOME" && \
12374 (test $prefix = NONE || test "$HOME" != "$prefix") && {
12375         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
12376         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
12377         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
12378         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
12379         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
12380         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
12381 }
12382
12383 cf_search="$cf_library_path_list $cf_search"
12384
12385                         for cf_libdir in $cf_search
12386                         do
12387                                 echo "$as_me:12387: checking for -l$cf_nculib_root in $cf_libdir" >&5
12388 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12389                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12390                                 cat >conftest.$ac_ext <<_ACEOF
12391 #line 12391 "configure"
12392 #include "confdefs.h"
12393 #include <${cf_cv_ncurses_header:-curses.h}>
12394 int
12395 main ()
12396 {
12397 initscr()
12398   ;
12399   return 0;
12400 }
12401 _ACEOF
12402 rm -f conftest.$ac_objext conftest$ac_exeext
12403 if { (eval echo "$as_me:12403: \"$ac_link\"") >&5
12404   (eval $ac_link) 2>&5
12405   ac_status=$?
12406   echo "$as_me:12406: \$? = $ac_status" >&5
12407   (exit $ac_status); } &&
12408          { ac_try='test -s conftest$ac_exeext'
12409   { (eval echo "$as_me:12409: \"$ac_try\"") >&5
12410   (eval $ac_try) 2>&5
12411   ac_status=$?
12412   echo "$as_me:12412: \$? = $ac_status" >&5
12413   (exit $ac_status); }; }; then
12414   echo "$as_me:12414: result: yes" >&5
12415 echo "${ECHO_T}yes" >&6
12416                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12417                                          break
12418 else
12419   echo "$as_me: failed program was:" >&5
12420 cat conftest.$ac_ext >&5
12421 echo "$as_me:12421: result: no" >&5
12422 echo "${ECHO_T}no" >&6
12423                                          LIBS="$cf_save_LIBS"
12424 fi
12425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426                         done
12427
12428 fi
12429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12430
12431 fi
12432
12433 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
12434
12435 if test $cf_found_library = no ; then
12436         { { echo "$as_me:12436: error: Cannot link $cf_nculib_root library" >&5
12437 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12438    { (exit 1); exit 1; }; }
12439 fi
12440
12441 fi
12442
12443 if test -n "$cf_ncurses_LIBS" ; then
12444         echo "$as_me:12444: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12445 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12446         cf_ncurses_SAVE="$LIBS"
12447         for p in $cf_ncurses_LIBS ; do
12448                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
12449                 if test "$q" != "$LIBS" ; then
12450                         LIBS="$q"
12451                 fi
12452         done
12453         cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456 #include <${cf_cv_ncurses_header:-curses.h}>
12457 int
12458 main ()
12459 {
12460 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -f conftest.$ac_objext conftest$ac_exeext
12466 if { (eval echo "$as_me:12466: \"$ac_link\"") >&5
12467   (eval $ac_link) 2>&5
12468   ac_status=$?
12469   echo "$as_me:12469: \$? = $ac_status" >&5
12470   (exit $ac_status); } &&
12471          { ac_try='test -s conftest$ac_exeext'
12472   { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; }; then
12477   echo "$as_me:12477: result: yes" >&5
12478 echo "${ECHO_T}yes" >&6
12479 else
12480   echo "$as_me: failed program was:" >&5
12481 cat conftest.$ac_ext >&5
12482 echo "$as_me:12482: result: no" >&5
12483 echo "${ECHO_T}no" >&6
12484                  LIBS="$cf_ncurses_SAVE"
12485 fi
12486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12487 fi
12488
12489 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12490
12491 cat >>confdefs.h <<EOF
12492 #define $cf_nculib_ROOT 1
12493 EOF
12494
12495 fi
12496
12497 else
12498         cf_wide_curses=no
12499
12500 echo "$as_me:12500: checking for extra include directories" >&5
12501 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
12502 if test "${cf_cv_curses_incdir+set}" = set; then
12503   echo $ECHO_N "(cached) $ECHO_C" >&6
12504 else
12505
12506 cf_cv_curses_incdir=no
12507 case $host_os in #(vi
12508 hpux10.*) #(vi
12509         if test "x$cf_cv_screen" = "xcurses_colr"
12510         then
12511                 test -d /usr/include/curses_colr && \
12512                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
12513         fi
12514         ;;
12515 sunos3*|sunos4*)
12516         if test "x$cf_cv_screen" = "xcurses_5lib"
12517         then
12518                 test -d /usr/5lib && \
12519                 test -d /usr/5include && \
12520                 cf_cv_curses_incdir="-I/usr/5include"
12521         fi
12522         ;;
12523 esac
12524
12525 fi
12526 echo "$as_me:12526: result: $cf_cv_curses_incdir" >&5
12527 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
12528 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
12529
12530 echo "$as_me:12530: checking if we have identified curses headers" >&5
12531 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
12532 if test "${cf_cv_ncurses_header+set}" = set; then
12533   echo $ECHO_N "(cached) $ECHO_C" >&6
12534 else
12535
12536 cf_cv_ncurses_header=none
12537 for cf_header in  \
12538         ncurses.h \
12539         curses.h ncurses/ncurses.h ncurses/curses.h
12540 do
12541 cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544 #include <${cf_header}>
12545 int
12546 main ()
12547 {
12548 initscr(); tgoto("?", 0,0)
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 rm -f conftest.$ac_objext
12554 if { (eval echo "$as_me:12554: \"$ac_compile\"") >&5
12555   (eval $ac_compile) 2>&5
12556   ac_status=$?
12557   echo "$as_me:12557: \$? = $ac_status" >&5
12558   (exit $ac_status); } &&
12559          { ac_try='test -s conftest.$ac_objext'
12560   { (eval echo "$as_me:12560: \"$ac_try\"") >&5
12561   (eval $ac_try) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); }; }; then
12565   cf_cv_ncurses_header=$cf_header; break
12566 else
12567   echo "$as_me: failed program was:" >&5
12568 cat conftest.$ac_ext >&5
12569 fi
12570 rm -f conftest.$ac_objext conftest.$ac_ext
12571 done
12572
12573 fi
12574 echo "$as_me:12574: result: $cf_cv_ncurses_header" >&5
12575 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
12576
12577 if test "$cf_cv_ncurses_header" = none ; then
12578         { { echo "$as_me:12578: error: No curses header-files found" >&5
12579 echo "$as_me: error: No curses header-files found" >&2;}
12580    { (exit 1); exit 1; }; }
12581 fi
12582
12583 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
12584
12585 for ac_header in $cf_cv_ncurses_header
12586 do
12587 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588 echo "$as_me:12588: checking for $ac_header" >&5
12589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12590 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12591   echo $ECHO_N "(cached) $ECHO_C" >&6
12592 else
12593   cat >conftest.$ac_ext <<_ACEOF
12594 #line 12594 "configure"
12595 #include "confdefs.h"
12596 #include <$ac_header>
12597 _ACEOF
12598 if { (eval echo "$as_me:12598: \"$ac_cpp conftest.$ac_ext\"") >&5
12599   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12600   ac_status=$?
12601   egrep -v '^ *\+' conftest.er1 >conftest.err
12602   rm -f conftest.er1
12603   cat conftest.err >&5
12604   echo "$as_me:12604: \$? = $ac_status" >&5
12605   (exit $ac_status); } >/dev/null; then
12606   if test -s conftest.err; then
12607     ac_cpp_err=$ac_c_preproc_warn_flag
12608   else
12609     ac_cpp_err=
12610   fi
12611 else
12612   ac_cpp_err=yes
12613 fi
12614 if test -z "$ac_cpp_err"; then
12615   eval "$as_ac_Header=yes"
12616 else
12617   echo "$as_me: failed program was:" >&5
12618   cat conftest.$ac_ext >&5
12619   eval "$as_ac_Header=no"
12620 fi
12621 rm -f conftest.err conftest.$ac_ext
12622 fi
12623 echo "$as_me:12623: result: `eval echo '${'$as_ac_Header'}'`" >&5
12624 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12625 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12626   cat >>confdefs.h <<EOF
12627 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12628 EOF
12629
12630 fi
12631 done
12632
12633 echo "$as_me:12633: checking for terminfo header" >&5
12634 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12635 if test "${cf_cv_term_header+set}" = set; then
12636   echo $ECHO_N "(cached) $ECHO_C" >&6
12637 else
12638
12639 case ${cf_cv_ncurses_header} in #(vi
12640 */ncurses.h|*/ncursesw.h) #(vi
12641         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12642         ;;
12643 *)
12644         cf_term_header=term.h
12645         ;;
12646 esac
12647
12648 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12649 do
12650 cat >conftest.$ac_ext <<_ACEOF
12651 #line 12651 "configure"
12652 #include "confdefs.h"
12653 #include <stdio.h>
12654 #include <${cf_cv_ncurses_header:-curses.h}>
12655 #include <$cf_test>
12656
12657 int
12658 main ()
12659 {
12660 int x = auto_left_margin
12661   ;
12662   return 0;
12663 }
12664 _ACEOF
12665 rm -f conftest.$ac_objext
12666 if { (eval echo "$as_me:12666: \"$ac_compile\"") >&5
12667   (eval $ac_compile) 2>&5
12668   ac_status=$?
12669   echo "$as_me:12669: \$? = $ac_status" >&5
12670   (exit $ac_status); } &&
12671          { ac_try='test -s conftest.$ac_objext'
12672   { (eval echo "$as_me:12672: \"$ac_try\"") >&5
12673   (eval $ac_try) 2>&5
12674   ac_status=$?
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit $ac_status); }; }; then
12677
12678         cf_cv_term_header="$cf_test"
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 cat conftest.$ac_ext >&5
12682
12683         cf_cv_term_header=unknown
12684
12685 fi
12686 rm -f conftest.$ac_objext conftest.$ac_ext
12687         test "$cf_cv_term_header" != unknown && break
12688 done
12689
12690 fi
12691 echo "$as_me:12691: result: $cf_cv_term_header" >&5
12692 echo "${ECHO_T}$cf_cv_term_header" >&6
12693
12694 # Set definitions to allow ifdef'ing to accommodate subdirectories
12695
12696 case $cf_cv_term_header in # (vi
12697 *term.h)
12698
12699 cat >>confdefs.h <<\EOF
12700 #define HAVE_TERM_H 1
12701 EOF
12702
12703         ;;
12704 esac
12705
12706 case $cf_cv_term_header in # (vi
12707 ncurses/term.h) #(vi
12708
12709 cat >>confdefs.h <<\EOF
12710 #define HAVE_NCURSES_TERM_H 1
12711 EOF
12712
12713         ;;
12714 ncursesw/term.h)
12715
12716 cat >>confdefs.h <<\EOF
12717 #define HAVE_NCURSESW_TERM_H 1
12718 EOF
12719
12720         ;;
12721 esac
12722
12723 echo "$as_me:12723: checking for ncurses version" >&5
12724 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12725 if test "${cf_cv_ncurses_version+set}" = set; then
12726   echo $ECHO_N "(cached) $ECHO_C" >&6
12727 else
12728
12729         cf_cv_ncurses_version=no
12730         cf_tempfile=out$$
12731         rm -f $cf_tempfile
12732         if test "$cross_compiling" = yes; then
12733
12734         # This will not work if the preprocessor splits the line after the
12735         # Autoconf token.  The 'unproto' program does that.
12736         cat > conftest.$ac_ext <<EOF
12737 #include <${cf_cv_ncurses_header:-curses.h}>
12738 #undef Autoconf
12739 #ifdef NCURSES_VERSION
12740 Autoconf NCURSES_VERSION
12741 #else
12742 #ifdef __NCURSES_H
12743 Autoconf "old"
12744 #endif
12745 ;
12746 #endif
12747 EOF
12748         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12749         { (eval echo "$as_me:12749: \"$cf_try\"") >&5
12750   (eval $cf_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); }
12754         if test -f conftest.out ; then
12755                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
12756                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12757                 rm -f conftest.out
12758         fi
12759
12760 else
12761   cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765 #include <${cf_cv_ncurses_header:-curses.h}>
12766 #include <stdio.h>
12767 int main()
12768 {
12769         FILE *fp = fopen("$cf_tempfile", "w");
12770 #ifdef NCURSES_VERSION
12771 # ifdef NCURSES_VERSION_PATCH
12772         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12773 # else
12774         fprintf(fp, "%s\n", NCURSES_VERSION);
12775 # endif
12776 #else
12777 # ifdef __NCURSES_H
12778         fprintf(fp, "old\n");
12779 # else
12780         make an error
12781 # endif
12782 #endif
12783         ${cf_cv_main_return:-return}(0);
12784 }
12785 _ACEOF
12786 rm -f conftest$ac_exeext
12787 if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788   (eval $ac_link) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12792   { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793   (eval $ac_try) 2>&5
12794   ac_status=$?
12795   echo "$as_me:12795: \$? = $ac_status" >&5
12796   (exit $ac_status); }; }; then
12797
12798         cf_cv_ncurses_version=`cat $cf_tempfile`
12799 else
12800   echo "$as_me: program exited with status $ac_status" >&5
12801 echo "$as_me: failed program was:" >&5
12802 cat conftest.$ac_ext >&5
12803 fi
12804 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12805 fi
12806         rm -f $cf_tempfile
12807
12808 fi
12809 echo "$as_me:12809: result: $cf_cv_ncurses_version" >&5
12810 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12811 test "$cf_cv_ncurses_version" = no ||
12812 cat >>confdefs.h <<\EOF
12813 #define NCURSES 1
12814 EOF
12815
12816 echo "$as_me:12816: checking if we have identified curses libraries" >&5
12817 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
12818 cat >conftest.$ac_ext <<_ACEOF
12819 #line 12819 "configure"
12820 #include "confdefs.h"
12821 #include <${cf_cv_ncurses_header:-curses.h}>
12822 int
12823 main ()
12824 {
12825 initscr(); tgoto("?", 0,0)
12826   ;
12827   return 0;
12828 }
12829 _ACEOF
12830 rm -f conftest.$ac_objext conftest$ac_exeext
12831 if { (eval echo "$as_me:12831: \"$ac_link\"") >&5
12832   (eval $ac_link) 2>&5
12833   ac_status=$?
12834   echo "$as_me:12834: \$? = $ac_status" >&5
12835   (exit $ac_status); } &&
12836          { ac_try='test -s conftest$ac_exeext'
12837   { (eval echo "$as_me:12837: \"$ac_try\"") >&5
12838   (eval $ac_try) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit $ac_status); }; }; then
12842   cf_result=yes
12843 else
12844   echo "$as_me: failed program was:" >&5
12845 cat conftest.$ac_ext >&5
12846 cf_result=no
12847 fi
12848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12849 echo "$as_me:12849: result: $cf_result" >&5
12850 echo "${ECHO_T}$cf_result" >&6
12851
12852 if test "$cf_result" = no ; then
12853 case $host_os in #(vi
12854 freebsd*) #(vi
12855     echo "$as_me:12855: checking for tgoto in -lmytinfo" >&5
12856 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12857 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12858   echo $ECHO_N "(cached) $ECHO_C" >&6
12859 else
12860   ac_check_lib_save_LIBS=$LIBS
12861 LIBS="-lmytinfo  $LIBS"
12862 cat >conftest.$ac_ext <<_ACEOF
12863 #line 12863 "configure"
12864 #include "confdefs.h"
12865
12866 /* Override any gcc2 internal prototype to avoid an error.  */
12867 #ifdef __cplusplus
12868 extern "C"
12869 #endif
12870 /* We use char because int might match the return type of a gcc2
12871    builtin and then its argument prototype would still apply.  */
12872 char tgoto ();
12873 int
12874 main ()
12875 {
12876 tgoto ();
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest$ac_exeext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   ac_cv_lib_mytinfo_tgoto=yes
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_cv_lib_mytinfo_tgoto=no
12898 fi
12899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900 LIBS=$ac_check_lib_save_LIBS
12901 fi
12902 echo "$as_me:12902: result: $ac_cv_lib_mytinfo_tgoto" >&5
12903 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12904 if test $ac_cv_lib_mytinfo_tgoto = yes; then
12905   LIBS="-lmytinfo $LIBS"
12906 fi
12907
12908     ;;
12909 hpux10.*) #(vi
12910         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
12911         # next (1998), and xcurses "newer" (2000).  There is no header file for
12912         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
12913         # term.h) for cur_colr
12914         if test "x$cf_cv_screen" = "xcurses_colr"
12915         then
12916                 echo "$as_me:12916: checking for initscr in -lcur_colr" >&5
12917 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
12918 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
12919   echo $ECHO_N "(cached) $ECHO_C" >&6
12920 else
12921   ac_check_lib_save_LIBS=$LIBS
12922 LIBS="-lcur_colr  $LIBS"
12923 cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926
12927 /* Override any gcc2 internal prototype to avoid an error.  */
12928 #ifdef __cplusplus
12929 extern "C"
12930 #endif
12931 /* We use char because int might match the return type of a gcc2
12932    builtin and then its argument prototype would still apply.  */
12933 char initscr ();
12934 int
12935 main ()
12936 {
12937 initscr ();
12938   ;
12939   return 0;
12940 }
12941 _ACEOF
12942 rm -f conftest.$ac_objext conftest$ac_exeext
12943 if { (eval echo "$as_me:12943: \"$ac_link\"") >&5
12944   (eval $ac_link) 2>&5
12945   ac_status=$?
12946   echo "$as_me:12946: \$? = $ac_status" >&5
12947   (exit $ac_status); } &&
12948          { ac_try='test -s conftest$ac_exeext'
12949   { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950   (eval $ac_try) 2>&5
12951   ac_status=$?
12952   echo "$as_me:12952: \$? = $ac_status" >&5
12953   (exit $ac_status); }; }; then
12954   ac_cv_lib_cur_colr_initscr=yes
12955 else
12956   echo "$as_me: failed program was:" >&5
12957 cat conftest.$ac_ext >&5
12958 ac_cv_lib_cur_colr_initscr=no
12959 fi
12960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12961 LIBS=$ac_check_lib_save_LIBS
12962 fi
12963 echo "$as_me:12963: result: $ac_cv_lib_cur_colr_initscr" >&5
12964 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
12965 if test $ac_cv_lib_cur_colr_initscr = yes; then
12966
12967                         LIBS="-lcur_colr $LIBS"
12968                         ac_cv_func_initscr=yes
12969
12970 else
12971
12972                 echo "$as_me:12972: checking for initscr in -lHcurses" >&5
12973 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
12974 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
12975   echo $ECHO_N "(cached) $ECHO_C" >&6
12976 else
12977   ac_check_lib_save_LIBS=$LIBS
12978 LIBS="-lHcurses  $LIBS"
12979 cat >conftest.$ac_ext <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982
12983 /* Override any gcc2 internal prototype to avoid an error.  */
12984 #ifdef __cplusplus
12985 extern "C"
12986 #endif
12987 /* We use char because int might match the return type of a gcc2
12988    builtin and then its argument prototype would still apply.  */
12989 char initscr ();
12990 int
12991 main ()
12992 {
12993 initscr ();
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f conftest.$ac_objext conftest$ac_exeext
12999 if { (eval echo "$as_me:12999: \"$ac_link\"") >&5
13000   (eval $ac_link) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit $ac_status); } &&
13004          { ac_try='test -s conftest$ac_exeext'
13005   { (eval echo "$as_me:13005: \"$ac_try\"") >&5
13006   (eval $ac_try) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); }; }; then
13010   ac_cv_lib_Hcurses_initscr=yes
13011 else
13012   echo "$as_me: failed program was:" >&5
13013 cat conftest.$ac_ext >&5
13014 ac_cv_lib_Hcurses_initscr=no
13015 fi
13016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13017 LIBS=$ac_check_lib_save_LIBS
13018 fi
13019 echo "$as_me:13019: result: $ac_cv_lib_Hcurses_initscr" >&5
13020 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
13021 if test $ac_cv_lib_Hcurses_initscr = yes; then
13022
13023                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
13024                         LIBS="-lHcurses $LIBS"
13025                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
13026                         ac_cv_func_initscr=yes
13027
13028 fi
13029
13030 fi
13031
13032         fi
13033         ;;
13034 linux*)
13035         case `arch 2>/dev/null` in
13036         x86_64)
13037                 if test -d /lib64
13038                 then
13039
13040 if test -n "/lib64" ; then
13041   for cf_add_libdir in /lib64
13042   do
13043     if test $cf_add_libdir = /usr/lib ; then
13044       :
13045     elif test -d $cf_add_libdir
13046     then
13047       cf_have_libdir=no
13048       if test -n "$LDFLAGS$LIBS" ; then
13049         # a loop is needed to ensure we can add subdirs of existing dirs
13050         for cf_test_libdir in $LDFLAGS $LIBS ; do
13051           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13052             cf_have_libdir=yes; break
13053           fi
13054         done
13055       fi
13056       if test "$cf_have_libdir" = no ; then
13057         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13058
13059 echo "${as_me:-configure}:13059: testing adding $cf_add_libdir to library-path ..." 1>&5
13060
13061         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13062       fi
13063     fi
13064   done
13065 fi
13066
13067                 else
13068
13069 if test -n "/lib" ; then
13070   for cf_add_libdir in /lib
13071   do
13072     if test $cf_add_libdir = /usr/lib ; then
13073       :
13074     elif test -d $cf_add_libdir
13075     then
13076       cf_have_libdir=no
13077       if test -n "$LDFLAGS$LIBS" ; then
13078         # a loop is needed to ensure we can add subdirs of existing dirs
13079         for cf_test_libdir in $LDFLAGS $LIBS ; do
13080           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13081             cf_have_libdir=yes; break
13082           fi
13083         done
13084       fi
13085       if test "$cf_have_libdir" = no ; then
13086         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13087
13088 echo "${as_me:-configure}:13088: testing adding $cf_add_libdir to library-path ..." 1>&5
13089
13090         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13091       fi
13092     fi
13093   done
13094 fi
13095
13096                 fi
13097                 ;;
13098         *)
13099
13100 if test -n "/lib" ; then
13101   for cf_add_libdir in /lib
13102   do
13103     if test $cf_add_libdir = /usr/lib ; then
13104       :
13105     elif test -d $cf_add_libdir
13106     then
13107       cf_have_libdir=no
13108       if test -n "$LDFLAGS$LIBS" ; then
13109         # a loop is needed to ensure we can add subdirs of existing dirs
13110         for cf_test_libdir in $LDFLAGS $LIBS ; do
13111           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13112             cf_have_libdir=yes; break
13113           fi
13114         done
13115       fi
13116       if test "$cf_have_libdir" = no ; then
13117         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13118
13119 echo "${as_me:-configure}:13119: testing adding $cf_add_libdir to library-path ..." 1>&5
13120
13121         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13122       fi
13123     fi
13124   done
13125 fi
13126
13127                 ;;
13128         esac
13129         ;;
13130 sunos3*|sunos4*)
13131         if test "x$cf_cv_screen" = "xcurses_5lib"
13132         then
13133                 if test -d /usr/5lib ; then
13134
13135 if test -n "/usr/5lib" ; then
13136   for cf_add_libdir in /usr/5lib
13137   do
13138     if test $cf_add_libdir = /usr/lib ; then
13139       :
13140     elif test -d $cf_add_libdir
13141     then
13142       cf_have_libdir=no
13143       if test -n "$LDFLAGS$LIBS" ; then
13144         # a loop is needed to ensure we can add subdirs of existing dirs
13145         for cf_test_libdir in $LDFLAGS $LIBS ; do
13146           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13147             cf_have_libdir=yes; break
13148           fi
13149         done
13150       fi
13151       if test "$cf_have_libdir" = no ; then
13152         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13153
13154 echo "${as_me:-configure}:13154: testing adding $cf_add_libdir to library-path ..." 1>&5
13155
13156         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13157       fi
13158     fi
13159   done
13160 fi
13161
13162                         LIBS="-lcurses -ltermcap $LIBS"
13163                 fi
13164     fi
13165     ac_cv_func_initscr=yes
13166     ;;
13167 esac
13168
13169 if test ".$ac_cv_func_initscr" != .yes ; then
13170         cf_save_LIBS="$LIBS"
13171
13172         if test ".${cf_cv_ncurses_version:-no}" != .no
13173         then
13174                 cf_check_list="ncurses curses cursesX"
13175         else
13176                 cf_check_list="cursesX curses ncurses"
13177         fi
13178
13179         # Check for library containing tgoto.  Do this before curses library
13180         # because it may be needed to link the test-case for initscr.
13181         if test "x$cf_term_lib" = x
13182         then
13183                 echo "$as_me:13183: checking for tgoto" >&5
13184 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
13185 if test "${ac_cv_func_tgoto+set}" = set; then
13186   echo $ECHO_N "(cached) $ECHO_C" >&6
13187 else
13188   cat >conftest.$ac_ext <<_ACEOF
13189 #line 13189 "configure"
13190 #include "confdefs.h"
13191 /* System header to define __stub macros and hopefully few prototypes,
13192     which can conflict with char tgoto (); below.  */
13193 #include <assert.h>
13194 /* Override any gcc2 internal prototype to avoid an error.  */
13195 #ifdef __cplusplus
13196 extern "C"
13197 #endif
13198 /* We use char because int might match the return type of a gcc2
13199    builtin and then its argument prototype would still apply.  */
13200 char tgoto ();
13201 char (*f) ();
13202
13203 int
13204 main ()
13205 {
13206 /* The GNU C library defines this for functions which it implements
13207     to always fail with ENOSYS.  Some functions are actually named
13208     something starting with __ and the normal name is an alias.  */
13209 #if defined (__stub_tgoto) || defined (__stub___tgoto)
13210 choke me
13211 #else
13212 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13213 #endif
13214
13215   ;
13216   return 0;
13217 }
13218 _ACEOF
13219 rm -f conftest.$ac_objext conftest$ac_exeext
13220 if { (eval echo "$as_me:13220: \"$ac_link\"") >&5
13221   (eval $ac_link) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -s conftest$ac_exeext'
13226   { (eval echo "$as_me:13226: \"$ac_try\"") >&5
13227   (eval $ac_try) 2>&5
13228   ac_status=$?
13229   echo "$as_me:13229: \$? = $ac_status" >&5
13230   (exit $ac_status); }; }; then
13231   ac_cv_func_tgoto=yes
13232 else
13233   echo "$as_me: failed program was:" >&5
13234 cat conftest.$ac_ext >&5
13235 ac_cv_func_tgoto=no
13236 fi
13237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13238 fi
13239 echo "$as_me:13239: result: $ac_cv_func_tgoto" >&5
13240 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
13241 if test $ac_cv_func_tgoto = yes; then
13242   cf_term_lib=predefined
13243 else
13244
13245                         for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
13246                         do
13247                                 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
13248 echo "$as_me:13248: checking for tgoto in -l$cf_term_lib" >&5
13249 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
13250 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13251   echo $ECHO_N "(cached) $ECHO_C" >&6
13252 else
13253   ac_check_lib_save_LIBS=$LIBS
13254 LIBS="-l$cf_term_lib  $LIBS"
13255 cat >conftest.$ac_ext <<_ACEOF
13256 #line 13256 "configure"
13257 #include "confdefs.h"
13258
13259 /* Override any gcc2 internal prototype to avoid an error.  */
13260 #ifdef __cplusplus
13261 extern "C"
13262 #endif
13263 /* We use char because int might match the return type of a gcc2
13264    builtin and then its argument prototype would still apply.  */
13265 char tgoto ();
13266 int
13267 main ()
13268 {
13269 tgoto ();
13270   ;
13271   return 0;
13272 }
13273 _ACEOF
13274 rm -f conftest.$ac_objext conftest$ac_exeext
13275 if { (eval echo "$as_me:13275: \"$ac_link\"") >&5
13276   (eval $ac_link) 2>&5
13277   ac_status=$?
13278   echo "$as_me:13278: \$? = $ac_status" >&5
13279   (exit $ac_status); } &&
13280          { ac_try='test -s conftest$ac_exeext'
13281   { (eval echo "$as_me:13281: \"$ac_try\"") >&5
13282   (eval $ac_try) 2>&5
13283   ac_status=$?
13284   echo "$as_me:13284: \$? = $ac_status" >&5
13285   (exit $ac_status); }; }; then
13286   eval "$as_ac_Lib=yes"
13287 else
13288   echo "$as_me: failed program was:" >&5
13289 cat conftest.$ac_ext >&5
13290 eval "$as_ac_Lib=no"
13291 fi
13292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13293 LIBS=$ac_check_lib_save_LIBS
13294 fi
13295 echo "$as_me:13295: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13296 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13297 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13298   break
13299 fi
13300
13301                         done
13302
13303 fi
13304
13305         fi
13306
13307         # Check for library containing initscr
13308         test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
13309         if test "x$cf_curs_lib" = x
13310         then
13311                 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
13312                 do
13313                         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
13314 echo "$as_me:13314: checking for initscr in -l$cf_curs_lib" >&5
13315 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
13316 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13317   echo $ECHO_N "(cached) $ECHO_C" >&6
13318 else
13319   ac_check_lib_save_LIBS=$LIBS
13320 LIBS="-l$cf_curs_lib  $LIBS"
13321 cat >conftest.$ac_ext <<_ACEOF
13322 #line 13322 "configure"
13323 #include "confdefs.h"
13324
13325 /* Override any gcc2 internal prototype to avoid an error.  */
13326 #ifdef __cplusplus
13327 extern "C"
13328 #endif
13329 /* We use char because int might match the return type of a gcc2
13330    builtin and then its argument prototype would still apply.  */
13331 char initscr ();
13332 int
13333 main ()
13334 {
13335 initscr ();
13336   ;
13337   return 0;
13338 }
13339 _ACEOF
13340 rm -f conftest.$ac_objext conftest$ac_exeext
13341 if { (eval echo "$as_me:13341: \"$ac_link\"") >&5
13342   (eval $ac_link) 2>&5
13343   ac_status=$?
13344   echo "$as_me:13344: \$? = $ac_status" >&5
13345   (exit $ac_status); } &&
13346          { ac_try='test -s conftest$ac_exeext'
13347   { (eval echo "$as_me:13347: \"$ac_try\"") >&5
13348   (eval $ac_try) 2>&5
13349   ac_status=$?
13350   echo "$as_me:13350: \$? = $ac_status" >&5
13351   (exit $ac_status); }; }; then
13352   eval "$as_ac_Lib=yes"
13353 else
13354   echo "$as_me: failed program was:" >&5
13355 cat conftest.$ac_ext >&5
13356 eval "$as_ac_Lib=no"
13357 fi
13358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13359 LIBS=$ac_check_lib_save_LIBS
13360 fi
13361 echo "$as_me:13361: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13362 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13363 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13364   break
13365 fi
13366
13367                 done
13368         fi
13369         test $cf_curs_lib = unknown && { { echo "$as_me:13369: error: no curses library found" >&5
13370 echo "$as_me: error: no curses library found" >&2;}
13371    { (exit 1); exit 1; }; }
13372
13373         LIBS="-l$cf_curs_lib $cf_save_LIBS"
13374         if test "$cf_term_lib" = unknown ; then
13375                 echo "$as_me:13375: checking if we can link with $cf_curs_lib library" >&5
13376 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
13377                 cat >conftest.$ac_ext <<_ACEOF
13378 #line 13378 "configure"
13379 #include "confdefs.h"
13380 #include <${cf_cv_ncurses_header:-curses.h}>
13381 int
13382 main ()
13383 {
13384 initscr()
13385   ;
13386   return 0;
13387 }
13388 _ACEOF
13389 rm -f conftest.$ac_objext conftest$ac_exeext
13390 if { (eval echo "$as_me:13390: \"$ac_link\"") >&5
13391   (eval $ac_link) 2>&5
13392   ac_status=$?
13393   echo "$as_me:13393: \$? = $ac_status" >&5
13394   (exit $ac_status); } &&
13395          { ac_try='test -s conftest$ac_exeext'
13396   { (eval echo "$as_me:13396: \"$ac_try\"") >&5
13397   (eval $ac_try) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); }; }; then
13401   cf_result=yes
13402 else
13403   echo "$as_me: failed program was:" >&5
13404 cat conftest.$ac_ext >&5
13405 cf_result=no
13406 fi
13407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13408                 echo "$as_me:13408: result: $cf_result" >&5
13409 echo "${ECHO_T}$cf_result" >&6
13410                 test $cf_result = no && { { echo "$as_me:13410: error: Cannot link curses library" >&5
13411 echo "$as_me: error: Cannot link curses library" >&2;}
13412    { (exit 1); exit 1; }; }
13413         elif test "$cf_curs_lib" = "$cf_term_lib" ; then
13414                 :
13415         elif test "$cf_term_lib" != predefined ; then
13416                 echo "$as_me:13416: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
13417 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
13418                 cat >conftest.$ac_ext <<_ACEOF
13419 #line 13419 "configure"
13420 #include "confdefs.h"
13421 #include <${cf_cv_ncurses_header:-curses.h}>
13422 int
13423 main ()
13424 {
13425 initscr(); tgoto((char *)0, 0, 0);
13426   ;
13427   return 0;
13428 }
13429 _ACEOF
13430 rm -f conftest.$ac_objext conftest$ac_exeext
13431 if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
13432   (eval $ac_link) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit $ac_status); } &&
13436          { ac_try='test -s conftest$ac_exeext'
13437   { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:13440: \$? = $ac_status" >&5
13441   (exit $ac_status); }; }; then
13442   cf_result=no
13443 else
13444   echo "$as_me: failed program was:" >&5
13445 cat conftest.$ac_ext >&5
13446
13447                         LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
13448                         cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451 #include <${cf_cv_ncurses_header:-curses.h}>
13452 int
13453 main ()
13454 {
13455 initscr()
13456   ;
13457   return 0;
13458 }
13459 _ACEOF
13460 rm -f conftest.$ac_objext conftest$ac_exeext
13461 if { (eval echo "$as_me:13461: \"$ac_link\"") >&5
13462   (eval $ac_link) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit $ac_status); } &&
13466          { ac_try='test -s conftest$ac_exeext'
13467   { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); }; }; then
13472   cf_result=yes
13473 else
13474   echo "$as_me: failed program was:" >&5
13475 cat conftest.$ac_ext >&5
13476 cf_result=error
13477 fi
13478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13479
13480 fi
13481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13482                 echo "$as_me:13482: result: $cf_result" >&5
13483 echo "${ECHO_T}$cf_result" >&6
13484         fi
13485 fi
13486 fi
13487
13488 fi
13489
13490 cf_all_widgets=yes
13491
13492 echo "$as_me:13492: checking if you want extra dialogs" >&5
13493 echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
13494
13495 # Check whether --enable-extras or --disable-extras was given.
13496 if test "${enable_extras+set}" = set; then
13497   enableval="$enable_extras"
13498
13499 else
13500   enableval=yes
13501 fi;
13502 echo "$as_me:13502: result: $enableval" >&5
13503 echo "${ECHO_T}$enableval" >&6
13504 if test "$enableval" != no ; then
13505 cf_all_widgets=yes
13506 else
13507 cf_all_widgets=no
13508 fi
13509
13510 echo "$as_me:13510: checking if you want config-file support" >&5
13511 echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
13512
13513 # Check whether --enable-rc-file or --disable-rc-file was given.
13514 if test "${enable_rc_file+set}" = set; then
13515   enableval="$enable_rc_file"
13516
13517 else
13518   enableval=$cf_all_widgets
13519 fi;
13520 echo "$as_me:13520: result: $enableval" >&5
13521 echo "${ECHO_T}$enableval" >&6
13522 if test "$enableval" != no ; then
13523 EXTRAOBJS="$EXTRAOBJS rc\$o"
13524
13525 cat >>confdefs.h <<\EOF
13526 #define HAVE_RC_FILE 1
13527 EOF
13528
13529 else
13530         :
13531 fi
13532
13533 echo "$as_me:13533: checking if you want Xdialog-style dialogs" >&5
13534 echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
13535
13536 # Check whether --enable-Xdialog or --disable-Xdialog was given.
13537 if test "${enable_Xdialog+set}" = set; then
13538   enableval="$enable_Xdialog"
13539
13540 else
13541   enableval=$cf_all_widgets
13542 fi;
13543 echo "$as_me:13543: result: $enableval" >&5
13544 echo "${ECHO_T}$enableval" >&6
13545 if test "$enableval" != no ; then
13546 EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
13547
13548 cat >>confdefs.h <<\EOF
13549 #define HAVE_XDIALOG 1
13550 EOF
13551
13552 else
13553         :
13554 fi
13555
13556 echo "$as_me:13556: checking if you want extra Xdialog-style dialogs (1.2)" >&5
13557 echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
13558
13559 # Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
13560 if test "${enable_Xdialog2+set}" = set; then
13561   enableval="$enable_Xdialog2"
13562
13563 else
13564   enableval=$cf_all_widgets
13565 fi;
13566 echo "$as_me:13566: result: $enableval" >&5
13567 echo "${ECHO_T}$enableval" >&6
13568 if test "$enableval" != no ; then
13569 EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
13570
13571 cat >>confdefs.h <<\EOF
13572 #define HAVE_XDIALOG2 1
13573 EOF
13574
13575 else
13576         :
13577 fi
13578
13579 echo "$as_me:13579: checking if you want compatibility with whiptail options" >&5
13580 echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
13581
13582 # Check whether --enable-whiptail or --disable-whiptail was given.
13583 if test "${enable_whiptail+set}" = set; then
13584   enableval="$enable_whiptail"
13585
13586 else
13587   enableval=$cf_all_widgets
13588 fi;
13589 echo "$as_me:13589: result: $enableval" >&5
13590 echo "${ECHO_T}$enableval" >&6
13591 if test "$enableval" != no ; then
13592
13593 cat >>confdefs.h <<\EOF
13594 #define HAVE_WHIPTAIL 1
13595 EOF
13596
13597 else
13598         :
13599 fi
13600
13601 echo "$as_me:13601: checking if you want the form dialog" >&5
13602 echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
13603
13604 # Check whether --enable-form or --disable-form was given.
13605 if test "${enable_form+set}" = set; then
13606   enableval="$enable_form"
13607
13608 else
13609   enableval=$cf_all_widgets
13610 fi;
13611 echo "$as_me:13611: result: $enableval" >&5
13612 echo "${ECHO_T}$enableval" >&6
13613 if test "$enableval" != no ; then
13614 EXTRAOBJS="$EXTRAOBJS formbox\$o"
13615
13616 cat >>confdefs.h <<\EOF
13617 #define HAVE_DLG_FORMBOX 1
13618 EOF
13619
13620 else
13621         :
13622 fi
13623
13624 echo "$as_me:13624: checking if you want the gauge dialog" >&5
13625 echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
13626
13627 # Check whether --enable-gauge or --disable-gauge was given.
13628 if test "${enable_gauge+set}" = set; then
13629   enableval="$enable_gauge"
13630
13631 else
13632   enableval=$cf_all_widgets
13633 fi;
13634 echo "$as_me:13634: result: $enableval" >&5
13635 echo "${ECHO_T}$enableval" >&6
13636 if test "$enableval" != no ; then
13637 EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
13638
13639 cat >>confdefs.h <<\EOF
13640 #define HAVE_DLG_GAUGE 1
13641 EOF
13642
13643 else
13644         :
13645 fi
13646
13647 echo "$as_me:13647: checking if you want the tailbox dialog" >&5
13648 echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
13649
13650 # Check whether --enable-tailbox or --disable-tailbox was given.
13651 if test "${enable_tailbox+set}" = set; then
13652   enableval="$enable_tailbox"
13653
13654 else
13655   enableval=$cf_all_widgets
13656 fi;
13657 echo "$as_me:13657: result: $enableval" >&5
13658 echo "${ECHO_T}$enableval" >&6
13659 if test "$enableval" != no ; then
13660 EXTRAOBJS="$EXTRAOBJS tailbox\$o"
13661
13662 cat >>confdefs.h <<\EOF
13663 #define HAVE_DLG_TAILBOX 1
13664 EOF
13665
13666 else
13667         :
13668 fi
13669
13670 echo "$as_me:13670: checking if you want the mixedform dialog" >&5
13671 echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
13672
13673 # Check whether --enable-mixedform or --disable-mixedform was given.
13674 if test "${enable_mixedform+set}" = set; then
13675   enableval="$enable_mixedform"
13676
13677 else
13678   enableval=$cf_all_widgets
13679 fi;
13680 echo "$as_me:13680: result: $enableval" >&5
13681 echo "${ECHO_T}$enableval" >&6
13682 if test "$enableval" != no ; then
13683 EXTRAOBJS="$EXTRAOBJS mixedform\$o"
13684
13685 cat >>confdefs.h <<\EOF
13686 #define HAVE_DLG_MIXEDFORM 1
13687 EOF
13688
13689 else
13690         :
13691 fi
13692
13693 echo "$as_me:13693: checking if you want the mixedgauge dialog" >&5
13694 echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
13695
13696 # Check whether --enable-mixedgauge or --disable-mixedgauge was given.
13697 if test "${enable_mixedgauge+set}" = set; then
13698   enableval="$enable_mixedgauge"
13699
13700 else
13701   enableval=$cf_all_widgets
13702 fi;
13703 echo "$as_me:13703: result: $enableval" >&5
13704 echo "${ECHO_T}$enableval" >&6
13705 if test "$enableval" != no ; then
13706 EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
13707
13708 cat >>confdefs.h <<\EOF
13709 #define HAVE_MIXEDGAUGE 1
13710 EOF
13711
13712 else
13713         :
13714 fi
13715
13716 echo "$as_me:13716: checking if you want the wide-curses features" >&5
13717 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
13718
13719 # Check whether --enable-widec or --disable-widec was given.
13720 if test "${enable_widec+set}" = set; then
13721   enableval="$enable_widec"
13722
13723 else
13724   enableval=$cf_wide_curses
13725 fi;
13726 echo "$as_me:13726: result: $enableval" >&5
13727 echo "${ECHO_T}$enableval" >&6
13728 if test "$enableval" != no ; then
13729
13730 cat >>confdefs.h <<\EOF
13731 #define USE_WIDE_CURSES 1
13732 EOF
13733
13734 else
13735         :
13736 fi
13737
13738 echo "$as_me:13738: checking for ANSI C header files" >&5
13739 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13740 if test "${ac_cv_header_stdc+set}" = set; then
13741   echo $ECHO_N "(cached) $ECHO_C" >&6
13742 else
13743   cat >conftest.$ac_ext <<_ACEOF
13744 #line 13744 "configure"
13745 #include "confdefs.h"
13746 #include <stdlib.h>
13747 #include <stdarg.h>
13748 #include <string.h>
13749 #include <float.h>
13750
13751 _ACEOF
13752 if { (eval echo "$as_me:13752: \"$ac_cpp conftest.$ac_ext\"") >&5
13753   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13754   ac_status=$?
13755   egrep -v '^ *\+' conftest.er1 >conftest.err
13756   rm -f conftest.er1
13757   cat conftest.err >&5
13758   echo "$as_me:13758: \$? = $ac_status" >&5
13759   (exit $ac_status); } >/dev/null; then
13760   if test -s conftest.err; then
13761     ac_cpp_err=$ac_c_preproc_warn_flag
13762   else
13763     ac_cpp_err=
13764   fi
13765 else
13766   ac_cpp_err=yes
13767 fi
13768 if test -z "$ac_cpp_err"; then
13769   ac_cv_header_stdc=yes
13770 else
13771   echo "$as_me: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   ac_cv_header_stdc=no
13774 fi
13775 rm -f conftest.err conftest.$ac_ext
13776
13777 if test $ac_cv_header_stdc = yes; then
13778   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13779   cat >conftest.$ac_ext <<_ACEOF
13780 #line 13780 "configure"
13781 #include "confdefs.h"
13782 #include <string.h>
13783
13784 _ACEOF
13785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13786   egrep "memchr" >/dev/null 2>&1; then
13787   :
13788 else
13789   ac_cv_header_stdc=no
13790 fi
13791 rm -rf conftest*
13792
13793 fi
13794
13795 if test $ac_cv_header_stdc = yes; then
13796   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13797   cat >conftest.$ac_ext <<_ACEOF
13798 #line 13798 "configure"
13799 #include "confdefs.h"
13800 #include <stdlib.h>
13801
13802 _ACEOF
13803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13804   egrep "free" >/dev/null 2>&1; then
13805   :
13806 else
13807   ac_cv_header_stdc=no
13808 fi
13809 rm -rf conftest*
13810
13811 fi
13812
13813 if test $ac_cv_header_stdc = yes; then
13814   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13815   if test "$cross_compiling" = yes; then
13816   :
13817 else
13818   cat >conftest.$ac_ext <<_ACEOF
13819 #line 13819 "configure"
13820 #include "confdefs.h"
13821 #include <ctype.h>
13822 #if ((' ' & 0x0FF) == 0x020)
13823 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13824 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13825 #else
13826 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13827                      || ('j' <= (c) && (c) <= 'r') \
13828                      || ('s' <= (c) && (c) <= 'z'))
13829 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13830 #endif
13831
13832 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13833 int
13834 main ()
13835 {
13836   int i;
13837   for (i = 0; i < 256; i++)
13838     if (XOR (islower (i), ISLOWER (i))
13839         || toupper (i) != TOUPPER (i))
13840       $ac_main_return(2);
13841   $ac_main_return (0);
13842 }
13843 _ACEOF
13844 rm -f conftest$ac_exeext
13845 if { (eval echo "$as_me:13845: \"$ac_link\"") >&5
13846   (eval $ac_link) 2>&5
13847   ac_status=$?
13848   echo "$as_me:13848: \$? = $ac_status" >&5
13849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13850   { (eval echo "$as_me:13850: \"$ac_try\"") >&5
13851   (eval $ac_try) 2>&5
13852   ac_status=$?
13853   echo "$as_me:13853: \$? = $ac_status" >&5
13854   (exit $ac_status); }; }; then
13855   :
13856 else
13857   echo "$as_me: program exited with status $ac_status" >&5
13858 echo "$as_me: failed program was:" >&5
13859 cat conftest.$ac_ext >&5
13860 ac_cv_header_stdc=no
13861 fi
13862 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13863 fi
13864 fi
13865 fi
13866 echo "$as_me:13866: result: $ac_cv_header_stdc" >&5
13867 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13868 if test $ac_cv_header_stdc = yes; then
13869
13870 cat >>confdefs.h <<\EOF
13871 #define STDC_HEADERS 1
13872 EOF
13873
13874 fi
13875
13876 echo "$as_me:13876: checking whether time.h and sys/time.h may both be included" >&5
13877 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13878 if test "${ac_cv_header_time+set}" = set; then
13879   echo $ECHO_N "(cached) $ECHO_C" >&6
13880 else
13881   cat >conftest.$ac_ext <<_ACEOF
13882 #line 13882 "configure"
13883 #include "confdefs.h"
13884 #include <sys/types.h>
13885 #include <sys/time.h>
13886 #include <time.h>
13887
13888 int
13889 main ()
13890 {
13891 if ((struct tm *) 0)
13892 return 0;
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 rm -f conftest.$ac_objext
13898 if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); } &&
13903          { ac_try='test -s conftest.$ac_objext'
13904   { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905   (eval $ac_try) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); }; }; then
13909   ac_cv_header_time=yes
13910 else
13911   echo "$as_me: failed program was:" >&5
13912 cat conftest.$ac_ext >&5
13913 ac_cv_header_time=no
13914 fi
13915 rm -f conftest.$ac_objext conftest.$ac_ext
13916 fi
13917 echo "$as_me:13917: result: $ac_cv_header_time" >&5
13918 echo "${ECHO_T}$ac_cv_header_time" >&6
13919 if test $ac_cv_header_time = yes; then
13920
13921 cat >>confdefs.h <<\EOF
13922 #define TIME_WITH_SYS_TIME 1
13923 EOF
13924
13925 fi
13926
13927 ac_header_dirent=no
13928 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13929   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13930 echo "$as_me:13930: checking for $ac_hdr that defines DIR" >&5
13931 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13933   echo $ECHO_N "(cached) $ECHO_C" >&6
13934 else
13935   cat >conftest.$ac_ext <<_ACEOF
13936 #line 13936 "configure"
13937 #include "confdefs.h"
13938 #include <sys/types.h>
13939 #include <$ac_hdr>
13940
13941 int
13942 main ()
13943 {
13944 if ((DIR *) 0)
13945 return 0;
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -f conftest.$ac_objext
13951 if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5
13952   (eval $ac_compile) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -s conftest.$ac_objext'
13957   { (eval echo "$as_me:13957: \"$ac_try\"") >&5
13958   (eval $ac_try) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit $ac_status); }; }; then
13962   eval "$as_ac_Header=yes"
13963 else
13964   echo "$as_me: failed program was:" >&5
13965 cat conftest.$ac_ext >&5
13966 eval "$as_ac_Header=no"
13967 fi
13968 rm -f conftest.$ac_objext conftest.$ac_ext
13969 fi
13970 echo "$as_me:13970: result: `eval echo '${'$as_ac_Header'}'`" >&5
13971 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13972 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13973   cat >>confdefs.h <<EOF
13974 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13975 EOF
13976
13977 ac_header_dirent=$ac_hdr; break
13978 fi
13979
13980 done
13981 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13982 if test $ac_header_dirent = dirent.h; then
13983   echo "$as_me:13983: checking for opendir in -ldir" >&5
13984 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13985 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13986   echo $ECHO_N "(cached) $ECHO_C" >&6
13987 else
13988   ac_check_lib_save_LIBS=$LIBS
13989 LIBS="-ldir  $LIBS"
13990 cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993
13994 /* Override any gcc2 internal prototype to avoid an error.  */
13995 #ifdef __cplusplus
13996 extern "C"
13997 #endif
13998 /* We use char because int might match the return type of a gcc2
13999    builtin and then its argument prototype would still apply.  */
14000 char opendir ();
14001 int
14002 main ()
14003 {
14004 opendir ();
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 rm -f conftest.$ac_objext conftest$ac_exeext
14010 if { (eval echo "$as_me:14010: \"$ac_link\"") >&5
14011   (eval $ac_link) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); } &&
14015          { ac_try='test -s conftest$ac_exeext'
14016   { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017   (eval $ac_try) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit $ac_status); }; }; then
14021   ac_cv_lib_dir_opendir=yes
14022 else
14023   echo "$as_me: failed program was:" >&5
14024 cat conftest.$ac_ext >&5
14025 ac_cv_lib_dir_opendir=no
14026 fi
14027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14028 LIBS=$ac_check_lib_save_LIBS
14029 fi
14030 echo "$as_me:14030: result: $ac_cv_lib_dir_opendir" >&5
14031 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14032 if test $ac_cv_lib_dir_opendir = yes; then
14033   LIBS="$LIBS -ldir"
14034 fi
14035
14036 else
14037   echo "$as_me:14037: checking for opendir in -lx" >&5
14038 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14039 if test "${ac_cv_lib_x_opendir+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   ac_check_lib_save_LIBS=$LIBS
14043 LIBS="-lx  $LIBS"
14044 cat >conftest.$ac_ext <<_ACEOF
14045 #line 14045 "configure"
14046 #include "confdefs.h"
14047
14048 /* Override any gcc2 internal prototype to avoid an error.  */
14049 #ifdef __cplusplus
14050 extern "C"
14051 #endif
14052 /* We use char because int might match the return type of a gcc2
14053    builtin and then its argument prototype would still apply.  */
14054 char opendir ();
14055 int
14056 main ()
14057 {
14058 opendir ();
14059   ;
14060   return 0;
14061 }
14062 _ACEOF
14063 rm -f conftest.$ac_objext conftest$ac_exeext
14064 if { (eval echo "$as_me:14064: \"$ac_link\"") >&5
14065   (eval $ac_link) 2>&5
14066   ac_status=$?
14067   echo "$as_me:14067: \$? = $ac_status" >&5
14068   (exit $ac_status); } &&
14069          { ac_try='test -s conftest$ac_exeext'
14070   { (eval echo "$as_me:14070: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   ac_cv_lib_x_opendir=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 cat conftest.$ac_ext >&5
14079 ac_cv_lib_x_opendir=no
14080 fi
14081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14082 LIBS=$ac_check_lib_save_LIBS
14083 fi
14084 echo "$as_me:14084: result: $ac_cv_lib_x_opendir" >&5
14085 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14086 if test $ac_cv_lib_x_opendir = yes; then
14087   LIBS="$LIBS -lx"
14088 fi
14089
14090 fi
14091
14092 for ac_header in search.h unctrl.h unistd.h
14093 do
14094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14095 echo "$as_me:14095: checking for $ac_header" >&5
14096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14098   echo $ECHO_N "(cached) $ECHO_C" >&6
14099 else
14100   cat >conftest.$ac_ext <<_ACEOF
14101 #line 14101 "configure"
14102 #include "confdefs.h"
14103 #include <$ac_header>
14104 _ACEOF
14105 if { (eval echo "$as_me:14105: \"$ac_cpp conftest.$ac_ext\"") >&5
14106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14107   ac_status=$?
14108   egrep -v '^ *\+' conftest.er1 >conftest.err
14109   rm -f conftest.er1
14110   cat conftest.err >&5
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit $ac_status); } >/dev/null; then
14113   if test -s conftest.err; then
14114     ac_cpp_err=$ac_c_preproc_warn_flag
14115   else
14116     ac_cpp_err=
14117   fi
14118 else
14119   ac_cpp_err=yes
14120 fi
14121 if test -z "$ac_cpp_err"; then
14122   eval "$as_ac_Header=yes"
14123 else
14124   echo "$as_me: failed program was:" >&5
14125   cat conftest.$ac_ext >&5
14126   eval "$as_ac_Header=no"
14127 fi
14128 rm -f conftest.err conftest.$ac_ext
14129 fi
14130 echo "$as_me:14130: result: `eval echo '${'$as_ac_Header'}'`" >&5
14131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14133   cat >>confdefs.h <<EOF
14134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14135 EOF
14136
14137 fi
14138 done
14139
14140 echo "$as_me:14140: checking for term.h" >&5
14141 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14142 if test "${cf_cv_term_header+set}" = set; then
14143   echo $ECHO_N "(cached) $ECHO_C" >&6
14144 else
14145
14146 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14147 # for <term.h> if we do not find the variant.
14148
14149 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14150
14151 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14152 */*)
14153         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14154         cf_header_list="$cf_header_item $cf_header_list"
14155         ;;
14156 esac
14157
14158 for cf_header in $cf_header_list
14159 do
14160         cat >conftest.$ac_ext <<_ACEOF
14161 #line 14161 "configure"
14162 #include "confdefs.h"
14163
14164 #include <${cf_cv_ncurses_header:-curses.h}>
14165 #include <${cf_header}>
14166 int
14167 main ()
14168 {
14169 WINDOW *x
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 rm -f conftest.$ac_objext
14175 if { (eval echo "$as_me:14175: \"$ac_compile\"") >&5
14176   (eval $ac_compile) 2>&5
14177   ac_status=$?
14178   echo "$as_me:14178: \$? = $ac_status" >&5
14179   (exit $ac_status); } &&
14180          { ac_try='test -s conftest.$ac_objext'
14181   { (eval echo "$as_me:14181: \"$ac_try\"") >&5
14182   (eval $ac_try) 2>&5
14183   ac_status=$?
14184   echo "$as_me:14184: \$? = $ac_status" >&5
14185   (exit $ac_status); }; }; then
14186   cf_cv_term_header=$cf_header
14187          break
14188 else
14189   echo "$as_me: failed program was:" >&5
14190 cat conftest.$ac_ext >&5
14191 cf_cv_term_header=no
14192 fi
14193 rm -f conftest.$ac_objext conftest.$ac_ext
14194 done
14195
14196 case $cf_cv_term_header in #(vi
14197 no)
14198         # If curses is ncurses, some packagers still mess it up by trying to make
14199         # us use GNU termcap.  This handles the most common case.
14200         for cf_header in ncurses/term.h ncursesw/term.h
14201         do
14202                 cat >conftest.$ac_ext <<_ACEOF
14203 #line 14203 "configure"
14204 #include "confdefs.h"
14205
14206 #include <${cf_cv_ncurses_header:-curses.h}>
14207 #ifdef NCURSES_VERSION
14208 #include <${cf_header}>
14209 #else
14210 make an error
14211 #endif
14212 int
14213 main ()
14214 {
14215 WINDOW *x
14216   ;
14217   return 0;
14218 }
14219 _ACEOF
14220 rm -f conftest.$ac_objext
14221 if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
14222   (eval $ac_compile) 2>&5
14223   ac_status=$?
14224   echo "$as_me:14224: \$? = $ac_status" >&5
14225   (exit $ac_status); } &&
14226          { ac_try='test -s conftest.$ac_objext'
14227   { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit $ac_status); }; }; then
14232   cf_cv_term_header=$cf_header
14233                          break
14234 else
14235   echo "$as_me: failed program was:" >&5
14236 cat conftest.$ac_ext >&5
14237 cf_cv_term_header=no
14238 fi
14239 rm -f conftest.$ac_objext conftest.$ac_ext
14240         done
14241         ;;
14242 esac
14243
14244 fi
14245 echo "$as_me:14245: result: $cf_cv_term_header" >&5
14246 echo "${ECHO_T}$cf_cv_term_header" >&6
14247
14248 case $cf_cv_term_header in #(vi
14249 term.h) #(vi
14250
14251 cat >>confdefs.h <<\EOF
14252 #define HAVE_TERM_H 1
14253 EOF
14254
14255         ;;
14256 ncurses/term.h) #(vi
14257
14258 cat >>confdefs.h <<\EOF
14259 #define HAVE_NCURSES_TERM_H 1
14260 EOF
14261
14262         ;;
14263 ncursesw/term.h)
14264
14265 cat >>confdefs.h <<\EOF
14266 #define HAVE_NCURSESW_TERM_H 1
14267 EOF
14268
14269         ;;
14270 esac
14271
14272 echo "$as_me:14272: checking return type of signal handlers" >&5
14273 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14274 if test "${ac_cv_type_signal+set}" = set; then
14275   echo $ECHO_N "(cached) $ECHO_C" >&6
14276 else
14277   cat >conftest.$ac_ext <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14280 #include <sys/types.h>
14281 #include <signal.h>
14282 #ifdef signal
14283 # undef signal
14284 #endif
14285 #ifdef __cplusplus
14286 extern "C" void (*signal (int, void (*)(int)))(int);
14287 #else
14288 void (*signal ()) ();
14289 #endif
14290
14291 int
14292 main ()
14293 {
14294 int i;
14295   ;
14296   return 0;
14297 }
14298 _ACEOF
14299 rm -f conftest.$ac_objext
14300 if { (eval echo "$as_me:14300: \"$ac_compile\"") >&5
14301   (eval $ac_compile) 2>&5
14302   ac_status=$?
14303   echo "$as_me:14303: \$? = $ac_status" >&5
14304   (exit $ac_status); } &&
14305          { ac_try='test -s conftest.$ac_objext'
14306   { (eval echo "$as_me:14306: \"$ac_try\"") >&5
14307   (eval $ac_try) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); }; }; then
14311   ac_cv_type_signal=void
14312 else
14313   echo "$as_me: failed program was:" >&5
14314 cat conftest.$ac_ext >&5
14315 ac_cv_type_signal=int
14316 fi
14317 rm -f conftest.$ac_objext conftest.$ac_ext
14318 fi
14319 echo "$as_me:14319: result: $ac_cv_type_signal" >&5
14320 echo "${ECHO_T}$ac_cv_type_signal" >&6
14321
14322 cat >>confdefs.h <<EOF
14323 #define RETSIGTYPE $ac_cv_type_signal
14324 EOF
14325
14326 for ac_func in \
14327 _nc_free_and_exit \
14328 btowc \
14329 mblen \
14330 mbrlen \
14331 mbrtowc \
14332 mbtowc \
14333 strcasecmp \
14334 strftime \
14335 tsearch \
14336 waitpid \
14337 wcsrtombs \
14338 wcstombs \
14339 wctob \
14340 wctomb \
14341
14342 do
14343 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14344 echo "$as_me:14344: checking for $ac_func" >&5
14345 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14346 if eval "test \"\${$as_ac_var+set}\" = set"; then
14347   echo $ECHO_N "(cached) $ECHO_C" >&6
14348 else
14349   cat >conftest.$ac_ext <<_ACEOF
14350 #line 14350 "configure"
14351 #include "confdefs.h"
14352 /* System header to define __stub macros and hopefully few prototypes,
14353     which can conflict with char $ac_func (); below.  */
14354 #include <assert.h>
14355 /* Override any gcc2 internal prototype to avoid an error.  */
14356 #ifdef __cplusplus
14357 extern "C"
14358 #endif
14359 /* We use char because int might match the return type of a gcc2
14360    builtin and then its argument prototype would still apply.  */
14361 char $ac_func ();
14362 char (*f) ();
14363
14364 int
14365 main ()
14366 {
14367 /* The GNU C library defines this for functions which it implements
14368     to always fail with ENOSYS.  Some functions are actually named
14369     something starting with __ and the normal name is an alias.  */
14370 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14371 choke me
14372 #else
14373 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14374 #endif
14375
14376   ;
14377   return 0;
14378 }
14379 _ACEOF
14380 rm -f conftest.$ac_objext conftest$ac_exeext
14381 if { (eval echo "$as_me:14381: \"$ac_link\"") >&5
14382   (eval $ac_link) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); } &&
14386          { ac_try='test -s conftest$ac_exeext'
14387   { (eval echo "$as_me:14387: \"$ac_try\"") >&5
14388   (eval $ac_try) 2>&5
14389   ac_status=$?
14390   echo "$as_me:14390: \$? = $ac_status" >&5
14391   (exit $ac_status); }; }; then
14392   eval "$as_ac_var=yes"
14393 else
14394   echo "$as_me: failed program was:" >&5
14395 cat conftest.$ac_ext >&5
14396 eval "$as_ac_var=no"
14397 fi
14398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14399 fi
14400 echo "$as_me:14400: result: `eval echo '${'$as_ac_var'}'`" >&5
14401 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14402 if test `eval echo '${'$as_ac_var'}'` = yes; then
14403   cat >>confdefs.h <<EOF
14404 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14405 EOF
14406
14407 fi
14408 done
14409
14410 echo "$as_me:14410: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
14411 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
14412 if test "${cf_cv_need_xopen_extension+set}" = set; then
14413   echo $ECHO_N "(cached) $ECHO_C" >&6
14414 else
14415
14416 cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419
14420 #include <stdlib.h>
14421 #include <${cf_cv_ncurses_header:-curses.h}>
14422 int
14423 main ()
14424 {
14425
14426 #if defined(NCURSES_VERSION_PATCH)
14427 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14428         make an error
14429 #endif
14430 #endif
14431         long x = winnstr(stdscr, "", 0);
14432         int x1, y1;
14433         getbegyx(stdscr, y1, x1)
14434   ;
14435   return 0;
14436 }
14437 _ACEOF
14438 rm -f conftest.$ac_objext conftest$ac_exeext
14439 if { (eval echo "$as_me:14439: \"$ac_link\"") >&5
14440   (eval $ac_link) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); } &&
14444          { ac_try='test -s conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   cf_cv_need_xopen_extension=no
14451 else
14452   echo "$as_me: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14454 cat >conftest.$ac_ext <<_ACEOF
14455 #line 14455 "configure"
14456 #include "confdefs.h"
14457
14458 #define _XOPEN_SOURCE_EXTENDED
14459 #include <stdlib.h>
14460 #include <${cf_cv_ncurses_header:-curses.h}>
14461 int
14462 main ()
14463 {
14464
14465 #ifdef NCURSES_VERSION
14466         cchar_t check;
14467         int check2 = curs_set((int)sizeof(check));
14468 #endif
14469         long x = winnstr(stdscr, "", 0);
14470         int x1, y1;
14471         getbegyx(stdscr, y1, x1)
14472   ;
14473   return 0;
14474 }
14475 _ACEOF
14476 rm -f conftest.$ac_objext conftest$ac_exeext
14477 if { (eval echo "$as_me:14477: \"$ac_link\"") >&5
14478   (eval $ac_link) 2>&5
14479   ac_status=$?
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); } &&
14482          { ac_try='test -s conftest$ac_exeext'
14483   { (eval echo "$as_me:14483: \"$ac_try\"") >&5
14484   (eval $ac_try) 2>&5
14485   ac_status=$?
14486   echo "$as_me:14486: \$? = $ac_status" >&5
14487   (exit $ac_status); }; }; then
14488   cf_cv_need_xopen_extension=yes
14489 else
14490   echo "$as_me: failed program was:" >&5
14491 cat conftest.$ac_ext >&5
14492 cf_cv_need_xopen_extension=unknown
14493 fi
14494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14495 fi
14496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14497 fi
14498 echo "$as_me:14498: result: $cf_cv_need_xopen_extension" >&5
14499 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14500 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14501
14502 echo "$as_me:14502: checking for unctrl.h" >&5
14503 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14504 if test "${cf_cv_unctrl_header+set}" = set; then
14505   echo $ECHO_N "(cached) $ECHO_C" >&6
14506 else
14507
14508 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14509 # for <unctrl.h> if we do not find the variant.
14510
14511 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14512
14513 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14514 */*)
14515         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14516         cf_header_list="$cf_header_item $cf_header_list"
14517         ;;
14518 esac
14519
14520 for cf_header in $cf_header_list
14521 do
14522         cat >conftest.$ac_ext <<_ACEOF
14523 #line 14523 "configure"
14524 #include "confdefs.h"
14525
14526 #include <${cf_cv_ncurses_header:-curses.h}>
14527 #include <${cf_header}>
14528 int
14529 main ()
14530 {
14531 WINDOW *x
14532   ;
14533   return 0;
14534 }
14535 _ACEOF
14536 rm -f conftest.$ac_objext
14537 if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5
14538   (eval $ac_compile) 2>&5
14539   ac_status=$?
14540   echo "$as_me:14540: \$? = $ac_status" >&5
14541   (exit $ac_status); } &&
14542          { ac_try='test -s conftest.$ac_objext'
14543   { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544   (eval $ac_try) 2>&5
14545   ac_status=$?
14546   echo "$as_me:14546: \$? = $ac_status" >&5
14547   (exit $ac_status); }; }; then
14548   cf_cv_unctrl_header=$cf_header
14549          break
14550 else
14551   echo "$as_me: failed program was:" >&5
14552 cat conftest.$ac_ext >&5
14553 cf_cv_unctrl_header=no
14554 fi
14555 rm -f conftest.$ac_objext conftest.$ac_ext
14556 done
14557
14558 case $cf_cv_unctrl_header in #(vi
14559 no)
14560         { echo "$as_me:14560: WARNING: unctrl.h header not found" >&5
14561 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14562         ;;
14563 esac
14564
14565 fi
14566 echo "$as_me:14566: result: $cf_cv_unctrl_header" >&5
14567 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14568
14569 case $cf_cv_unctrl_header in #(vi
14570 unctrl.h) #(vi
14571
14572 cat >>confdefs.h <<\EOF
14573 #define HAVE_UNCTRL_H 1
14574 EOF
14575
14576         ;;
14577 ncurses/unctrl.h) #(vi
14578
14579 cat >>confdefs.h <<\EOF
14580 #define HAVE_NCURSES_UNCTRL_H 1
14581 EOF
14582
14583         ;;
14584 ncursesw/unctrl.h)
14585
14586 cat >>confdefs.h <<\EOF
14587 #define HAVE_NCURSESW_UNCTRL_H 1
14588 EOF
14589
14590         ;;
14591 esac
14592
14593 for cf_func in \
14594 flushinp \
14595 getattrs \
14596 getbegx \
14597 getbegy \
14598 getbegyx \
14599 getcurx \
14600 getcury \
14601 getmaxx \
14602 getmaxy \
14603 getmaxyx \
14604 getparx \
14605 getpary \
14606 getparyx \
14607 use_default_colors \
14608 wchgat \
14609 wcursyncup \
14610 wget_wch \
14611 wsyncup \
14612
14613 do
14614
14615 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14616
14617         echo "$as_me:14617: checking for ${cf_func}" >&5
14618 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14619
14620 echo "${as_me:-configure}:14620: testing ${cf_func} ..." 1>&5
14621
14622         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14623   echo $ECHO_N "(cached) $ECHO_C" >&6
14624 else
14625
14626                 eval cf_result='$ac_cv_func_'$cf_func
14627                 if test ".$cf_result" != ".no"; then
14628                         cat >conftest.$ac_ext <<_ACEOF
14629 #line 14629 "configure"
14630 #include "confdefs.h"
14631
14632 #ifdef HAVE_XCURSES
14633 #include <xcurses.h>
14634 char * XCursesProgramName = "test";
14635 #else
14636 #include <${cf_cv_ncurses_header:-curses.h}>
14637 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14638 #include <ncursesw/term.h>
14639 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14640 #include <ncurses/term.h>
14641 #elif defined(HAVE_TERM_H)
14642 #include <term.h>
14643 #endif
14644 #endif
14645
14646 int
14647 main ()
14648 {
14649
14650 #ifndef ${cf_func}
14651 long foo = (long)(&${cf_func});
14652 if (foo + 1234 > 5678)
14653         ${cf_cv_main_return:-return}(foo);
14654 #endif
14655
14656   ;
14657   return 0;
14658 }
14659 _ACEOF
14660 rm -f conftest.$ac_objext conftest$ac_exeext
14661 if { (eval echo "$as_me:14661: \"$ac_link\"") >&5
14662   (eval $ac_link) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); } &&
14666          { ac_try='test -s conftest$ac_exeext'
14667   { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   cf_result=yes
14673 else
14674   echo "$as_me: failed program was:" >&5
14675 cat conftest.$ac_ext >&5
14676 cf_result=no
14677 fi
14678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14679                 fi
14680                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14681
14682 fi
14683
14684         # use the computed/retrieved cache-value:
14685         eval 'cf_result=$cf_cv_func_'$cf_func
14686         echo "$as_me:14686: result: $cf_result" >&5
14687 echo "${ECHO_T}$cf_result" >&6
14688         if test $cf_result != no; then
14689                 cat >>confdefs.h <<EOF
14690 #define HAVE_${cf_tr_func} 1
14691 EOF
14692
14693         fi
14694 done
14695
14696 echo "$as_me:14696: checking for start_color" >&5
14697 echo $ECHO_N "checking for start_color... $ECHO_C" >&6
14698 if test "${ac_cv_func_start_color+set}" = set; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   cat >conftest.$ac_ext <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704 /* System header to define __stub macros and hopefully few prototypes,
14705     which can conflict with char start_color (); below.  */
14706 #include <assert.h>
14707 /* Override any gcc2 internal prototype to avoid an error.  */
14708 #ifdef __cplusplus
14709 extern "C"
14710 #endif
14711 /* We use char because int might match the return type of a gcc2
14712    builtin and then its argument prototype would still apply.  */
14713 char start_color ();
14714 char (*f) ();
14715
14716 int
14717 main ()
14718 {
14719 /* The GNU C library defines this for functions which it implements
14720     to always fail with ENOSYS.  Some functions are actually named
14721     something starting with __ and the normal name is an alias.  */
14722 #if defined (__stub_start_color) || defined (__stub___start_color)
14723 choke me
14724 #else
14725 f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14726 #endif
14727
14728   ;
14729   return 0;
14730 }
14731 _ACEOF
14732 rm -f conftest.$ac_objext conftest$ac_exeext
14733 if { (eval echo "$as_me:14733: \"$ac_link\"") >&5
14734   (eval $ac_link) 2>&5
14735   ac_status=$?
14736   echo "$as_me:14736: \$? = $ac_status" >&5
14737   (exit $ac_status); } &&
14738          { ac_try='test -s conftest$ac_exeext'
14739   { (eval echo "$as_me:14739: \"$ac_try\"") >&5
14740   (eval $ac_try) 2>&5
14741   ac_status=$?
14742   echo "$as_me:14742: \$? = $ac_status" >&5
14743   (exit $ac_status); }; }; then
14744   ac_cv_func_start_color=yes
14745 else
14746   echo "$as_me: failed program was:" >&5
14747 cat conftest.$ac_ext >&5
14748 ac_cv_func_start_color=no
14749 fi
14750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14751 fi
14752 echo "$as_me:14752: result: $ac_cv_func_start_color" >&5
14753 echo "${ECHO_T}$ac_cv_func_start_color" >&6
14754 if test $ac_cv_func_start_color = yes; then
14755
14756 cat >>confdefs.h <<\EOF
14757 #define HAVE_COLOR 1
14758 EOF
14759
14760 fi
14761
14762 echo "$as_me:14762: checking for chtype typedef" >&5
14763 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
14764 if test "${cf_cv_chtype_decl+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767
14768         cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771 #include <${cf_cv_ncurses_header:-curses.h}>
14772 int
14773 main ()
14774 {
14775 chtype foo
14776   ;
14777   return 0;
14778 }
14779 _ACEOF
14780 rm -f conftest.$ac_objext
14781 if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5
14782   (eval $ac_compile) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); } &&
14786          { ac_try='test -s conftest.$ac_objext'
14787   { (eval echo "$as_me:14787: \"$ac_try\"") >&5
14788   (eval $ac_try) 2>&5
14789   ac_status=$?
14790   echo "$as_me:14790: \$? = $ac_status" >&5
14791   (exit $ac_status); }; }; then
14792   cf_cv_chtype_decl=yes
14793 else
14794   echo "$as_me: failed program was:" >&5
14795 cat conftest.$ac_ext >&5
14796 cf_cv_chtype_decl=no
14797 fi
14798 rm -f conftest.$ac_objext conftest.$ac_ext
14799 fi
14800 echo "$as_me:14800: result: $cf_cv_chtype_decl" >&5
14801 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
14802 if test $cf_cv_chtype_decl = yes ; then
14803
14804 cat >>confdefs.h <<\EOF
14805 #define HAVE_TYPE_CHTYPE 1
14806 EOF
14807
14808         echo "$as_me:14808: checking if chtype is scalar or struct" >&5
14809 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
14810 if test "${cf_cv_chtype_type+set}" = set; then
14811   echo $ECHO_N "(cached) $ECHO_C" >&6
14812 else
14813
14814                 cat >conftest.$ac_ext <<_ACEOF
14815 #line 14815 "configure"
14816 #include "confdefs.h"
14817 #include <${cf_cv_ncurses_header:-curses.h}>
14818 int
14819 main ()
14820 {
14821 chtype foo; long x = foo
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 rm -f conftest.$ac_objext
14827 if { (eval echo "$as_me:14827: \"$ac_compile\"") >&5
14828   (eval $ac_compile) 2>&5
14829   ac_status=$?
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } &&
14832          { ac_try='test -s conftest.$ac_objext'
14833   { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); }; }; then
14838   cf_cv_chtype_type=scalar
14839 else
14840   echo "$as_me: failed program was:" >&5
14841 cat conftest.$ac_ext >&5
14842 cf_cv_chtype_type=struct
14843 fi
14844 rm -f conftest.$ac_objext conftest.$ac_ext
14845 fi
14846 echo "$as_me:14846: result: $cf_cv_chtype_type" >&5
14847 echo "${ECHO_T}$cf_cv_chtype_type" >&6
14848         if test $cf_cv_chtype_type = scalar ; then
14849
14850 cat >>confdefs.h <<\EOF
14851 #define TYPE_CHTYPE_IS_SCALAR 1
14852 EOF
14853
14854         fi
14855 fi
14856
14857 echo "$as_me:14857: checking for wide alternate character set array" >&5
14858 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14859 if test "${cf_cv_curses_wacs_map+set}" = set; then
14860   echo $ECHO_N "(cached) $ECHO_C" >&6
14861 else
14862
14863         cf_cv_curses_wacs_map=unknown
14864         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14865         do
14866         cat >conftest.$ac_ext <<_ACEOF
14867 #line 14867 "configure"
14868 #include "confdefs.h"
14869
14870 #ifndef _XOPEN_SOURCE_EXTENDED
14871 #define _XOPEN_SOURCE_EXTENDED
14872 #endif
14873 #include <${cf_cv_ncurses_header:-curses.h}>
14874 int
14875 main ()
14876 {
14877 void *foo = &($name['k'])
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext conftest$ac_exeext
14883 if { (eval echo "$as_me:14883: \"$ac_link\"") >&5
14884   (eval $ac_link) 2>&5
14885   ac_status=$?
14886   echo "$as_me:14886: \$? = $ac_status" >&5
14887   (exit $ac_status); } &&
14888          { ac_try='test -s conftest$ac_exeext'
14889   { (eval echo "$as_me:14889: \"$ac_try\"") >&5
14890   (eval $ac_try) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); }; }; then
14894   cf_cv_curses_wacs_map=$name
14895          break
14896 else
14897   echo "$as_me: failed program was:" >&5
14898 cat conftest.$ac_ext >&5
14899 fi
14900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14901         done
14902 fi
14903 echo "$as_me:14903: result: $cf_cv_curses_wacs_map" >&5
14904 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14905
14906 test "$cf_cv_curses_wacs_map" != unknown &&
14907 cat >>confdefs.h <<EOF
14908 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14909 EOF
14910
14911 echo "$as_me:14911: checking for wide alternate character constants" >&5
14912 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14913 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14914   echo $ECHO_N "(cached) $ECHO_C" >&6
14915 else
14916
14917 cf_cv_curses_wacs_symbols=no
14918 if test "$cf_cv_curses_wacs_map" != unknown
14919 then
14920         cat >conftest.$ac_ext <<_ACEOF
14921 #line 14921 "configure"
14922 #include "confdefs.h"
14923
14924 #ifndef _XOPEN_SOURCE_EXTENDED
14925 #define _XOPEN_SOURCE_EXTENDED
14926 #endif
14927 #include <${cf_cv_ncurses_header:-curses.h}>
14928 int
14929 main ()
14930 {
14931 cchar_t *foo = WACS_PLUS;
14932          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14933   ;
14934   return 0;
14935 }
14936 _ACEOF
14937 rm -f conftest.$ac_objext conftest$ac_exeext
14938 if { (eval echo "$as_me:14938: \"$ac_link\"") >&5
14939   (eval $ac_link) 2>&5
14940   ac_status=$?
14941   echo "$as_me:14941: \$? = $ac_status" >&5
14942   (exit $ac_status); } &&
14943          { ac_try='test -s conftest$ac_exeext'
14944   { (eval echo "$as_me:14944: \"$ac_try\"") >&5
14945   (eval $ac_try) 2>&5
14946   ac_status=$?
14947   echo "$as_me:14947: \$? = $ac_status" >&5
14948   (exit $ac_status); }; }; then
14949   cf_cv_curses_wacs_symbols=yes
14950 else
14951   echo "$as_me: failed program was:" >&5
14952 cat conftest.$ac_ext >&5
14953 fi
14954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14955 else
14956         cat >conftest.$ac_ext <<_ACEOF
14957 #line 14957 "configure"
14958 #include "confdefs.h"
14959
14960 #ifndef _XOPEN_SOURCE_EXTENDED
14961 #define _XOPEN_SOURCE_EXTENDED
14962 #endif
14963 #include <${cf_cv_ncurses_header:-curses.h}>
14964 int
14965 main ()
14966 {
14967 cchar_t *foo = WACS_PLUS
14968   ;
14969   return 0;
14970 }
14971 _ACEOF
14972 rm -f conftest.$ac_objext conftest$ac_exeext
14973 if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
14974   (eval $ac_link) 2>&5
14975   ac_status=$?
14976   echo "$as_me:14976: \$? = $ac_status" >&5
14977   (exit $ac_status); } &&
14978          { ac_try='test -s conftest$ac_exeext'
14979   { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); }; }; then
14984   cf_cv_curses_wacs_symbols=yes
14985 else
14986   echo "$as_me: failed program was:" >&5
14987 cat conftest.$ac_ext >&5
14988 fi
14989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14990 fi
14991
14992 fi
14993 echo "$as_me:14993: result: $cf_cv_curses_wacs_symbols" >&5
14994 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14995
14996 test "$cf_cv_curses_wacs_symbols" != no &&
14997 cat >>confdefs.h <<\EOF
14998 #define CURSES_WACS_SYMBOLS 1
14999 EOF
15000
15001 for cf_func in wgetparent
15002 do
15003
15004 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15005
15006         echo "$as_me:15006: checking for ${cf_func}" >&5
15007 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15008
15009 echo "${as_me:-configure}:15009: testing ${cf_func} ..." 1>&5
15010
15011         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15012   echo $ECHO_N "(cached) $ECHO_C" >&6
15013 else
15014
15015                 eval cf_result='$ac_cv_func_'$cf_func
15016                 if test ".$cf_result" != ".no"; then
15017                         cat >conftest.$ac_ext <<_ACEOF
15018 #line 15018 "configure"
15019 #include "confdefs.h"
15020
15021 #ifdef HAVE_XCURSES
15022 #include <xcurses.h>
15023 char * XCursesProgramName = "test";
15024 #else
15025 #include <${cf_cv_ncurses_header:-curses.h}>
15026 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15027 #include <ncursesw/term.h>
15028 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15029 #include <ncurses/term.h>
15030 #elif defined(HAVE_TERM_H)
15031 #include <term.h>
15032 #endif
15033 #endif
15034
15035 int
15036 main ()
15037 {
15038
15039 #ifndef ${cf_func}
15040 long foo = (long)(&${cf_func});
15041 if (foo + 1234 > 5678)
15042         ${cf_cv_main_return:-return}(foo);
15043 #endif
15044
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 rm -f conftest.$ac_objext conftest$ac_exeext
15050 if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
15051   (eval $ac_link) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); } &&
15055          { ac_try='test -s conftest$ac_exeext'
15056   { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); }; }; then
15061   cf_result=yes
15062 else
15063   echo "$as_me: failed program was:" >&5
15064 cat conftest.$ac_ext >&5
15065 cf_result=no
15066 fi
15067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15068                 fi
15069                 eval 'cf_cv_func_'$cf_func'=$cf_result'
15070
15071 fi
15072
15073         # use the computed/retrieved cache-value:
15074         eval 'cf_result=$cf_cv_func_'$cf_func
15075         echo "$as_me:15075: result: $cf_result" >&5
15076 echo "${ECHO_T}$cf_result" >&6
15077         if test $cf_result != no; then
15078                 cat >>confdefs.h <<EOF
15079 #define HAVE_${cf_tr_func} 1
15080 EOF
15081
15082         fi
15083 done
15084
15085 if test "x$cf_cv_func_wgetparent" != xyes
15086 then
15087         echo "$as_me:15087: checking if WINDOW has _parent member" >&5
15088 echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
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 ()
15095 {
15096 WINDOW *p = stdscr->_parent
15097   ;
15098   return 0;
15099 }
15100 _ACEOF
15101 rm -f conftest.$ac_objext
15102 if { (eval echo "$as_me:15102: \"$ac_compile\"") >&5
15103   (eval $ac_compile) 2>&5
15104   ac_status=$?
15105   echo "$as_me:15105: \$? = $ac_status" >&5
15106   (exit $ac_status); } &&
15107          { ac_try='test -s conftest.$ac_objext'
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_window__parent=yes
15114 else
15115   echo "$as_me: failed program was:" >&5
15116 cat conftest.$ac_ext >&5
15117 cf_window__parent=no
15118 fi
15119 rm -f conftest.$ac_objext conftest.$ac_ext
15120         echo "$as_me:15120: result: $cf_window__parent" >&5
15121 echo "${ECHO_T}$cf_window__parent" >&6
15122         if test "$cf_window__parent" = yes
15123         then
15124
15125 cat >>confdefs.h <<\EOF
15126 #define HAVE_WINDOW__PARENT 1
15127 EOF
15128
15129         fi
15130 fi
15131
15132 for ac_header in sys/wait.h
15133 do
15134 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15135 echo "$as_me:15135: checking for $ac_header" >&5
15136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15138   echo $ECHO_N "(cached) $ECHO_C" >&6
15139 else
15140   cat >conftest.$ac_ext <<_ACEOF
15141 #line 15141 "configure"
15142 #include "confdefs.h"
15143 #include <$ac_header>
15144 _ACEOF
15145 if { (eval echo "$as_me:15145: \"$ac_cpp conftest.$ac_ext\"") >&5
15146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15147   ac_status=$?
15148   egrep -v '^ *\+' conftest.er1 >conftest.err
15149   rm -f conftest.er1
15150   cat conftest.err >&5
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } >/dev/null; then
15153   if test -s conftest.err; then
15154     ac_cpp_err=$ac_c_preproc_warn_flag
15155   else
15156     ac_cpp_err=
15157   fi
15158 else
15159   ac_cpp_err=yes
15160 fi
15161 if test -z "$ac_cpp_err"; then
15162   eval "$as_ac_Header=yes"
15163 else
15164   echo "$as_me: failed program was:" >&5
15165   cat conftest.$ac_ext >&5
15166   eval "$as_ac_Header=no"
15167 fi
15168 rm -f conftest.err conftest.$ac_ext
15169 fi
15170 echo "$as_me:15170: result: `eval echo '${'$as_ac_Header'}'`" >&5
15171 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15172 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15173   cat >>confdefs.h <<EOF
15174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15175 EOF
15176
15177 fi
15178 done
15179
15180 cf_wait_headers="#include <sys/types.h>
15181 "
15182 if test $ac_cv_header_sys_wait_h = yes; then
15183 cf_wait_headers="$cf_wait_headers
15184 #include <sys/wait.h>
15185 "
15186 else
15187
15188 for ac_header in wait.h
15189 do
15190 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15191 echo "$as_me:15191: checking for $ac_header" >&5
15192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15194   echo $ECHO_N "(cached) $ECHO_C" >&6
15195 else
15196   cat >conftest.$ac_ext <<_ACEOF
15197 #line 15197 "configure"
15198 #include "confdefs.h"
15199 #include <$ac_header>
15200 _ACEOF
15201 if { (eval echo "$as_me:15201: \"$ac_cpp conftest.$ac_ext\"") >&5
15202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15203   ac_status=$?
15204   egrep -v '^ *\+' conftest.er1 >conftest.err
15205   rm -f conftest.er1
15206   cat conftest.err >&5
15207   echo "$as_me:15207: \$? = $ac_status" >&5
15208   (exit $ac_status); } >/dev/null; then
15209   if test -s conftest.err; then
15210     ac_cpp_err=$ac_c_preproc_warn_flag
15211   else
15212     ac_cpp_err=
15213   fi
15214 else
15215   ac_cpp_err=yes
15216 fi
15217 if test -z "$ac_cpp_err"; then
15218   eval "$as_ac_Header=yes"
15219 else
15220   echo "$as_me: failed program was:" >&5
15221   cat conftest.$ac_ext >&5
15222   eval "$as_ac_Header=no"
15223 fi
15224 rm -f conftest.err conftest.$ac_ext
15225 fi
15226 echo "$as_me:15226: result: `eval echo '${'$as_ac_Header'}'`" >&5
15227 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15228 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15229   cat >>confdefs.h <<EOF
15230 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15231 EOF
15232
15233 fi
15234 done
15235
15236 for ac_header in waitstatus.h
15237 do
15238 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15239 echo "$as_me:15239: checking for $ac_header" >&5
15240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15242   echo $ECHO_N "(cached) $ECHO_C" >&6
15243 else
15244   cat >conftest.$ac_ext <<_ACEOF
15245 #line 15245 "configure"
15246 #include "confdefs.h"
15247 #include <$ac_header>
15248 _ACEOF
15249 if { (eval echo "$as_me:15249: \"$ac_cpp conftest.$ac_ext\"") >&5
15250   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15251   ac_status=$?
15252   egrep -v '^ *\+' conftest.er1 >conftest.err
15253   rm -f conftest.er1
15254   cat conftest.err >&5
15255   echo "$as_me:15255: \$? = $ac_status" >&5
15256   (exit $ac_status); } >/dev/null; then
15257   if test -s conftest.err; then
15258     ac_cpp_err=$ac_c_preproc_warn_flag
15259   else
15260     ac_cpp_err=
15261   fi
15262 else
15263   ac_cpp_err=yes
15264 fi
15265 if test -z "$ac_cpp_err"; then
15266   eval "$as_ac_Header=yes"
15267 else
15268   echo "$as_me: failed program was:" >&5
15269   cat conftest.$ac_ext >&5
15270   eval "$as_ac_Header=no"
15271 fi
15272 rm -f conftest.err conftest.$ac_ext
15273 fi
15274 echo "$as_me:15274: result: `eval echo '${'$as_ac_Header'}'`" >&5
15275 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15276 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15277   cat >>confdefs.h <<EOF
15278 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15279 EOF
15280
15281 fi
15282 done
15283
15284 if test $ac_cv_header_wait_h = yes; then
15285 cf_wait_headers="$cf_wait_headers
15286 #include <wait.h>
15287 "
15288 fi
15289 if test $ac_cv_header_waitstatus_h = yes; then
15290 cf_wait_headers="$cf_wait_headers
15291 #include <waitstatus.h>
15292 "
15293 fi
15294 fi
15295
15296 echo "$as_me:15296: checking for union wait" >&5
15297 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
15298 if test "${cf_cv_type_unionwait+set}" = set; then
15299   echo $ECHO_N "(cached) $ECHO_C" >&6
15300 else
15301
15302         cat >conftest.$ac_ext <<_ACEOF
15303 #line 15303 "configure"
15304 #include "confdefs.h"
15305 $cf_wait_headers
15306 int
15307 main ()
15308 {
15309 int x;
15310          int y = WEXITSTATUS(x);
15311          int z = WTERMSIG(x);
15312          wait(&x);
15313
15314   ;
15315   return 0;
15316 }
15317 _ACEOF
15318 rm -f conftest.$ac_objext conftest$ac_exeext
15319 if { (eval echo "$as_me:15319: \"$ac_link\"") >&5
15320   (eval $ac_link) 2>&5
15321   ac_status=$?
15322   echo "$as_me:15322: \$? = $ac_status" >&5
15323   (exit $ac_status); } &&
15324          { ac_try='test -s conftest$ac_exeext'
15325   { (eval echo "$as_me:15325: \"$ac_try\"") >&5
15326   (eval $ac_try) 2>&5
15327   ac_status=$?
15328   echo "$as_me:15328: \$? = $ac_status" >&5
15329   (exit $ac_status); }; }; then
15330   cf_cv_type_unionwait=no
15331          echo compiles ok w/o union wait 1>&5
15332
15333 else
15334   echo "$as_me: failed program was:" >&5
15335 cat conftest.$ac_ext >&5
15336
15337         cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340 $cf_wait_headers
15341 int
15342 main ()
15343 {
15344 union wait x;
15345 #ifdef WEXITSTATUS
15346          int y = WEXITSTATUS(x);
15347 #endif
15348 #ifdef WTERMSIG
15349          int z = WTERMSIG(x);
15350 #endif
15351          wait(&x);
15352
15353   ;
15354   return 0;
15355 }
15356 _ACEOF
15357 rm -f conftest.$ac_objext conftest$ac_exeext
15358 if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359   (eval $ac_link) 2>&5
15360   ac_status=$?
15361   echo "$as_me:15361: \$? = $ac_status" >&5
15362   (exit $ac_status); } &&
15363          { ac_try='test -s conftest$ac_exeext'
15364   { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369   cf_cv_type_unionwait=yes
15370          echo compiles ok with union wait and possibly macros too 1>&5
15371
15372 else
15373   echo "$as_me: failed program was:" >&5
15374 cat conftest.$ac_ext >&5
15375 cf_cv_type_unionwait=no
15376 fi
15377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15378 fi
15379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15380 fi
15381
15382 echo "$as_me:15382: result: $cf_cv_type_unionwait" >&5
15383 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
15384 test $cf_cv_type_unionwait = yes &&
15385 cat >>confdefs.h <<\EOF
15386 #define HAVE_TYPE_UNIONWAIT 1
15387 EOF
15388
15389 if test $cf_cv_type_unionwait = yes; then
15390
15391         echo "$as_me:15391: checking if union wait can be used as wait-arg" >&5
15392 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
15393         if test "${cf_cv_arg_union_wait+set}" = set; then
15394   echo $ECHO_N "(cached) $ECHO_C" >&6
15395 else
15396
15397                 cat >conftest.$ac_ext <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400 $cf_wait_headers
15401 int
15402 main ()
15403 {
15404 union wait x; wait(&x)
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext
15410 if { (eval echo "$as_me:15410: \"$ac_compile\"") >&5
15411   (eval $ac_compile) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest.$ac_objext'
15416   { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   cf_cv_arg_union_wait=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_arg_union_wait=no
15426 fi
15427 rm -f conftest.$ac_objext conftest.$ac_ext
15428
15429 fi
15430
15431         echo "$as_me:15431: result: $cf_cv_arg_union_wait" >&5
15432 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
15433         test $cf_cv_arg_union_wait = yes &&
15434 cat >>confdefs.h <<\EOF
15435 #define WAIT_USES_UNION 1
15436 EOF
15437
15438         echo "$as_me:15438: checking if union wait can be used as waitpid-arg" >&5
15439 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
15440         if test "${cf_cv_arg_union_waitpid+set}" = set; then
15441   echo $ECHO_N "(cached) $ECHO_C" >&6
15442 else
15443
15444                 cat >conftest.$ac_ext <<_ACEOF
15445 #line 15445 "configure"
15446 #include "confdefs.h"
15447 $cf_wait_headers
15448 int
15449 main ()
15450 {
15451 union wait x; waitpid(0, &x, 0)
15452   ;
15453   return 0;
15454 }
15455 _ACEOF
15456 rm -f conftest.$ac_objext
15457 if { (eval echo "$as_me:15457: \"$ac_compile\"") >&5
15458   (eval $ac_compile) 2>&5
15459   ac_status=$?
15460   echo "$as_me:15460: \$? = $ac_status" >&5
15461   (exit $ac_status); } &&
15462          { ac_try='test -s conftest.$ac_objext'
15463   { (eval echo "$as_me:15463: \"$ac_try\"") >&5
15464   (eval $ac_try) 2>&5
15465   ac_status=$?
15466   echo "$as_me:15466: \$? = $ac_status" >&5
15467   (exit $ac_status); }; }; then
15468   cf_cv_arg_union_waitpid=yes
15469 else
15470   echo "$as_me: failed program was:" >&5
15471 cat conftest.$ac_ext >&5
15472 cf_cv_arg_union_waitpid=no
15473 fi
15474 rm -f conftest.$ac_objext conftest.$ac_ext
15475
15476 fi
15477
15478         echo "$as_me:15478: result: $cf_cv_arg_union_waitpid" >&5
15479 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
15480         test $cf_cv_arg_union_waitpid = yes &&
15481 cat >>confdefs.h <<\EOF
15482 #define WAITPID_USES_UNION 1
15483 EOF
15484
15485 fi
15486
15487 echo "$as_me:15487: checking if we must include wchar.h to declare mbstate_t" >&5
15488 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15489 if test "${cf_cv_mbstate_t+set}" = set; then
15490   echo $ECHO_N "(cached) $ECHO_C" >&6
15491 else
15492
15493 cat >conftest.$ac_ext <<_ACEOF
15494 #line 15494 "configure"
15495 #include "confdefs.h"
15496
15497 #include <stdlib.h>
15498 #include <stdio.h>
15499 #ifdef HAVE_LIBUTF8_H
15500 #include <libutf8.h>
15501 #endif
15502 int
15503 main ()
15504 {
15505 mbstate_t state
15506   ;
15507   return 0;
15508 }
15509 _ACEOF
15510 rm -f conftest.$ac_objext
15511 if { (eval echo "$as_me:15511: \"$ac_compile\"") >&5
15512   (eval $ac_compile) 2>&5
15513   ac_status=$?
15514   echo "$as_me:15514: \$? = $ac_status" >&5
15515   (exit $ac_status); } &&
15516          { ac_try='test -s conftest.$ac_objext'
15517   { (eval echo "$as_me:15517: \"$ac_try\"") >&5
15518   (eval $ac_try) 2>&5
15519   ac_status=$?
15520   echo "$as_me:15520: \$? = $ac_status" >&5
15521   (exit $ac_status); }; }; then
15522   cf_cv_mbstate_t=no
15523 else
15524   echo "$as_me: failed program was:" >&5
15525 cat conftest.$ac_ext >&5
15526 cat >conftest.$ac_ext <<_ACEOF
15527 #line 15527 "configure"
15528 #include "confdefs.h"
15529
15530 #include <stdlib.h>
15531 #include <stdio.h>
15532 #include <wchar.h>
15533 #ifdef HAVE_LIBUTF8_H
15534 #include <libutf8.h>
15535 #endif
15536 int
15537 main ()
15538 {
15539 mbstate_t value
15540   ;
15541   return 0;
15542 }
15543 _ACEOF
15544 rm -f conftest.$ac_objext
15545 if { (eval echo "$as_me:15545: \"$ac_compile\"") >&5
15546   (eval $ac_compile) 2>&5
15547   ac_status=$?
15548   echo "$as_me:15548: \$? = $ac_status" >&5
15549   (exit $ac_status); } &&
15550          { ac_try='test -s conftest.$ac_objext'
15551   { (eval echo "$as_me:15551: \"$ac_try\"") >&5
15552   (eval $ac_try) 2>&5
15553   ac_status=$?
15554   echo "$as_me:15554: \$? = $ac_status" >&5
15555   (exit $ac_status); }; }; then
15556   cf_cv_mbstate_t=yes
15557 else
15558   echo "$as_me: failed program was:" >&5
15559 cat conftest.$ac_ext >&5
15560 cf_cv_mbstate_t=unknown
15561 fi
15562 rm -f conftest.$ac_objext conftest.$ac_ext
15563 fi
15564 rm -f conftest.$ac_objext conftest.$ac_ext
15565 fi
15566 echo "$as_me:15566: result: $cf_cv_mbstate_t" >&5
15567 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15568
15569 if test "$cf_cv_mbstate_t" = yes ; then
15570
15571 cat >>confdefs.h <<\EOF
15572 #define NEED_WCHAR_H 1
15573 EOF
15574
15575 fi
15576
15577 if test "$cf_cv_mbstate_t" != unknown ; then
15578
15579 cat >>confdefs.h <<\EOF
15580 #define HAVE_MBSTATE_T 1
15581 EOF
15582
15583 fi
15584
15585 PACKAGE_PREFIX=DLG
15586 PACKAGE_CONFIG=dlg_config.h
15587
15588 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
15589
15590 cat >conftest.$ac_ext <<_ACEOF
15591 #line 15591 "configure"
15592 #include "confdefs.h"
15593 #include <locale.h>
15594 int
15595 main ()
15596 {
15597 setlocale(LC_ALL, "")
15598   ;
15599   return 0;
15600 }
15601 _ACEOF
15602 rm -f conftest.$ac_objext conftest$ac_exeext
15603 if { (eval echo "$as_me:15603: \"$ac_link\"") >&5
15604   (eval $ac_link) 2>&5
15605   ac_status=$?
15606   echo "$as_me:15606: \$? = $ac_status" >&5
15607   (exit $ac_status); } &&
15608          { ac_try='test -s conftest$ac_exeext'
15609   { (eval echo "$as_me:15609: \"$ac_try\"") >&5
15610   (eval $ac_try) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit $ac_status); }; }; then
15614
15615 cat >>confdefs.h <<\EOF
15616 #define HAVE_SETLOCALE 1
15617 EOF
15618
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 fi
15623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15624
15625 echo "$as_me:15625: checking if rpath-hack should be disabled" >&5
15626 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
15627
15628 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
15629 if test "${enable_rpath_hack+set}" = set; then
15630   enableval="$enable_rpath_hack"
15631   test "$enableval" != no && enableval=yes
15632   if test "$enableval" != "yes" ; then
15633     cf_disable_rpath_hack=yes
15634   else
15635     cf_disable_rpath_hack=no
15636   fi
15637 else
15638   enableval=yes
15639   cf_disable_rpath_hack=no
15640
15641 fi;
15642 echo "$as_me:15642: result: $cf_disable_rpath_hack" >&5
15643 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
15644 if test "$cf_disable_rpath_hack" = no ; then
15645
15646 echo "$as_me:15646: checking for updated LDFLAGS" >&5
15647 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15648 if test -n "$LD_RPATH_OPT" ; then
15649         echo "$as_me:15649: result: maybe" >&5
15650 echo "${ECHO_T}maybe" >&6
15651
15652         for ac_prog in ldd
15653 do
15654   # Extract the first word of "$ac_prog", so it can be a program name with args.
15655 set dummy $ac_prog; ac_word=$2
15656 echo "$as_me:15656: checking for $ac_word" >&5
15657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15658 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
15659   echo $ECHO_N "(cached) $ECHO_C" >&6
15660 else
15661   if test -n "$cf_ldd_prog"; then
15662   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
15663 else
15664   ac_save_IFS=$IFS; IFS=$ac_path_separator
15665 ac_dummy="$PATH"
15666 for ac_dir in $ac_dummy; do
15667   IFS=$ac_save_IFS
15668   test -z "$ac_dir" && ac_dir=.
15669   $as_executable_p "$ac_dir/$ac_word" || continue
15670 ac_cv_prog_cf_ldd_prog="$ac_prog"
15671 echo "$as_me:15671: found $ac_dir/$ac_word" >&5
15672 break
15673 done
15674
15675 fi
15676 fi
15677 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
15678 if test -n "$cf_ldd_prog"; then
15679   echo "$as_me:15679: result: $cf_ldd_prog" >&5
15680 echo "${ECHO_T}$cf_ldd_prog" >&6
15681 else
15682   echo "$as_me:15682: result: no" >&5
15683 echo "${ECHO_T}no" >&6
15684 fi
15685
15686   test -n "$cf_ldd_prog" && break
15687 done
15688 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
15689
15690         cf_rpath_list="/usr/lib /lib"
15691         if test "$cf_ldd_prog" != no
15692         then
15693                 cf_rpath_oops=
15694
15695 cat >conftest.$ac_ext <<_ACEOF
15696 #line 15696 "configure"
15697 #include "confdefs.h"
15698 #include <stdio.h>
15699 int
15700 main ()
15701 {
15702 printf("Hello");
15703   ;
15704   return 0;
15705 }
15706 _ACEOF
15707 rm -f conftest.$ac_objext conftest$ac_exeext
15708 if { (eval echo "$as_me:15708: \"$ac_link\"") >&5
15709   (eval $ac_link) 2>&5
15710   ac_status=$?
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); } &&
15713          { ac_try='test -s conftest$ac_exeext'
15714   { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715   (eval $ac_try) 2>&5
15716   ac_status=$?
15717   echo "$as_me:15717: \$? = $ac_status" >&5
15718   (exit $ac_status); }; }; then
15719   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
15720                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
15721 else
15722   echo "$as_me: failed program was:" >&5
15723 cat conftest.$ac_ext >&5
15724 fi
15725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15726
15727                 # If we passed the link-test, but get a "not found" on a given library,
15728                 # this could be due to inept reconfiguration of gcc to make it only
15729                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
15730                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
15731                 # /usr/local libraries.
15732                 if test -n "$cf_rpath_oops"
15733                 then
15734                         for cf_rpath_src in $cf_rpath_oops
15735                         do
15736                                 for cf_rpath_dir in \
15737                                         /usr/local \
15738                                         /usr/pkg \
15739                                         /opt/sfw
15740                                 do
15741                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
15742                                         then
15743                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
15744
15745 echo "${as_me:-configure}:15745: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
15746
15747                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
15748                                                 break
15749                                         fi
15750                                 done
15751                         done
15752                 fi
15753         fi
15754
15755         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15756
15757 echo "${as_me:-configure}:15757: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15758
15759 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
15760
15761 echo "${as_me:-configure}:15761: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
15762
15763 cf_rpath_dst=
15764 for cf_rpath_src in $LDFLAGS
15765 do
15766         case $cf_rpath_src in #(vi
15767         -L*) #(vi
15768
15769                 # check if this refers to a directory which we will ignore
15770                 cf_rpath_skip=no
15771                 if test -n "$cf_rpath_list"
15772                 then
15773                         for cf_rpath_item in $cf_rpath_list
15774                         do
15775                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15776                                 then
15777                                         cf_rpath_skip=yes
15778                                         break
15779                                 fi
15780                         done
15781                 fi
15782
15783                 if test "$cf_rpath_skip" = no
15784                 then
15785                         # transform the option
15786                         if test "$LD_RPATH_OPT" = "-R " ; then
15787                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15788                         else
15789                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15790                         fi
15791
15792                         # if we have not already added this, add it now
15793                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15794                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15795                         then
15796                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15797
15798 echo "${as_me:-configure}:15798: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15799
15800                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15801                         fi
15802                 fi
15803                 ;;
15804         esac
15805         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15806 done
15807 LDFLAGS=$cf_rpath_dst
15808
15809 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
15810
15811 echo "${as_me:-configure}:15811: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
15812
15813 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
15814
15815 echo "${as_me:-configure}:15815: testing ...checking LIBS $LIBS ..." 1>&5
15816
15817 cf_rpath_dst=
15818 for cf_rpath_src in $LIBS
15819 do
15820         case $cf_rpath_src in #(vi
15821         -L*) #(vi
15822
15823                 # check if this refers to a directory which we will ignore
15824                 cf_rpath_skip=no
15825                 if test -n "$cf_rpath_list"
15826                 then
15827                         for cf_rpath_item in $cf_rpath_list
15828                         do
15829                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15830                                 then
15831                                         cf_rpath_skip=yes
15832                                         break
15833                                 fi
15834                         done
15835                 fi
15836
15837                 if test "$cf_rpath_skip" = no
15838                 then
15839                         # transform the option
15840                         if test "$LD_RPATH_OPT" = "-R " ; then
15841                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15842                         else
15843                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15844                         fi
15845
15846                         # if we have not already added this, add it now
15847                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15848                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15849                         then
15850                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15851
15852 echo "${as_me:-configure}:15852: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15853
15854                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15855                         fi
15856                 fi
15857                 ;;
15858         esac
15859         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15860 done
15861 LIBS=$cf_rpath_dst
15862
15863 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
15864
15865 echo "${as_me:-configure}:15865: testing ...checked LIBS $LIBS ..." 1>&5
15866
15867         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15868
15869 echo "${as_me:-configure}:15869: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15870
15871 else
15872         echo "$as_me:15872: result: no" >&5
15873 echo "${ECHO_T}no" >&6
15874 fi
15875
15876 fi
15877
15878 cf_libname=\${LIB_BASENAME}
15879 cf_liblink=$cf_libname
15880 cf_libroot=$cf_libname
15881
15882 if test "x$cf_cv_do_symlinks" = xyes
15883 then
15884         case "x$cf_cv_shlib_version" in #(vi
15885         xrel) #(vi
15886                 cf_liblink="\${LIB_ABI_NAME}"
15887                 cf_libname="\${LIB_REL_NAME}"
15888                 ;;
15889         xabi)
15890                 cf_liblink="\${LIB_REL_NAME}"
15891                 cf_libname="\${LIB_ABI_NAME}"
15892                 ;;
15893         esac
15894 fi
15895 LIB_TARGET=$cf_libname
15896
15897 SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
15898 LIB_BASENAME    = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
15899 LIB_REL_NAME    = \${LIB_BASENAME}.\${REL_VERSION}\\
15900 LIB_ABI_NAME    = \${LIB_BASENAME}.\${ABI_VERSION}\\
15901 LIB_TARGET      = $LIB_TARGET\\
15902 RM_SHARED_OPTS  = $RM_SHARED_OPTS\\
15903 # end CF__DEFINE_SHLIB_VARS"
15904
15905 ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
15906 ac_config_commands="$ac_config_commands default"
15907 cat >confcache <<\_ACEOF
15908 # This file is a shell script that caches the results of configure
15909 # tests run on this system so they can be shared between configure
15910 # scripts and configure runs, see configure's option --config-cache.
15911 # It is not useful on other systems.  If it contains results you don't
15912 # want to keep, you may remove or edit it.
15913 #
15914 # config.status only pays attention to the cache file if you give it
15915 # the --recheck option to rerun configure.
15916 #
15917 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15918 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15919 # following values.
15920
15921 _ACEOF
15922
15923 # The following way of writing the cache mishandles newlines in values,
15924 # but we know of no workaround that is simple, portable, and efficient.
15925 # So, don't put newlines in cache variables' values.
15926 # Ultrix sh set writes to stderr and can't be redirected directly,
15927 # and sets the high bit in the cache file unless we assign to the vars.
15928 {
15929   (set) 2>&1 |
15930     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15931     *ac_space=\ *)
15932       # `set' does not quote correctly, so add quotes (double-quote
15933       # substitution turns \\\\ into \\, and sed turns \\ into \).
15934       sed -n \
15935         "s/'/'\\\\''/g;
15936           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15937       ;;
15938     *)
15939       # `set' quotes correctly as required by POSIX, so do not add quotes.
15940       sed -n \
15941         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15942       ;;
15943     esac;
15944 } |
15945   sed '
15946      t clear
15947      : clear
15948      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15949      t end
15950      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15951      : end' >>confcache
15952 if cmp -s $cache_file confcache; then :; else
15953   if test -w $cache_file; then
15954     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15955     cat confcache >$cache_file
15956   else
15957     echo "not updating unwritable cache $cache_file"
15958   fi
15959 fi
15960 rm -f confcache
15961
15962 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15963 # Let make expand exec_prefix.
15964 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15965
15966 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15967 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15968 # trailing colons and then remove the whole line if VPATH becomes empty
15969 # (actually we leave an empty line to preserve line numbers).
15970 if test "x$srcdir" = x.; then
15971   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15972 s/:*\$(srcdir):*/:/;
15973 s/:*\${srcdir}:*/:/;
15974 s/:*@srcdir@:*/:/;
15975 s/^\([^=]*=[    ]*\):*/\1/;
15976 s/:*$//;
15977 s/^[^=]*=[      ]*$//;
15978 }'
15979 fi
15980
15981 DEFS=-DHAVE_CONFIG_H
15982
15983 : ${CONFIG_STATUS=./config.status}
15984 ac_clean_files_save=$ac_clean_files
15985 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15986 { echo "$as_me:15986: creating $CONFIG_STATUS" >&5
15987 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15988 cat >$CONFIG_STATUS <<_ACEOF
15989 #! $SHELL
15990 # Generated automatically by configure.
15991 # Run this file to recreate the current configuration.
15992 # Compiler output produced by configure, useful for debugging
15993 # configure, is in config.log if it exists.
15994
15995 debug=false
15996 SHELL=\${CONFIG_SHELL-$SHELL}
15997 ac_cs_invocation="\$0 \$@"
15998
15999 _ACEOF
16000
16001 cat >>$CONFIG_STATUS <<\_ACEOF
16002 # Be Bourne compatible
16003 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16004   emulate sh
16005   NULLCMD=:
16006 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16007   set -o posix
16008 fi
16009
16010 # Name of the executable.
16011 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16012
16013 if expr a : '\(a\)' >/dev/null 2>&1; then
16014   as_expr=expr
16015 else
16016   as_expr=false
16017 fi
16018
16019 rm -f conf$$ conf$$.exe conf$$.file
16020 echo >conf$$.file
16021 if ln -s conf$$.file conf$$ 2>/dev/null; then
16022   # We could just check for DJGPP; but this test a) works b) is more generic
16023   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16024   if test -f conf$$.exe; then
16025     # Don't use ln at all; we don't have any links
16026     as_ln_s='cp -p'
16027   else
16028     as_ln_s='ln -s'
16029   fi
16030 elif ln conf$$.file conf$$ 2>/dev/null; then
16031   as_ln_s=ln
16032 else
16033   as_ln_s='cp -p'
16034 fi
16035 rm -f conf$$ conf$$.exe conf$$.file
16036
16037 as_executable_p="test -f"
16038
16039 # Support unset when possible.
16040 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16041   as_unset=unset
16042 else
16043   as_unset=false
16044 fi
16045
16046 # NLS nuisances.
16047 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16048 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16049 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16050 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16051 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16052 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16053 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16054 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16055
16056 # IFS
16057 # We need space, tab and new line, in precisely that order.
16058 as_nl='
16059 '
16060 IFS="   $as_nl"
16061
16062 # CDPATH.
16063 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16064
16065 exec 6>&1
16066
16067 _ACEOF
16068
16069 # Files that config.status was made for.
16070 if test -n "$ac_config_files"; then
16071   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16072 fi
16073
16074 if test -n "$ac_config_headers"; then
16075   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16076 fi
16077
16078 if test -n "$ac_config_links"; then
16079   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16080 fi
16081
16082 if test -n "$ac_config_commands"; then
16083   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16084 fi
16085
16086 cat >>$CONFIG_STATUS <<\EOF
16087
16088 ac_cs_usage="\
16089 \`$as_me' instantiates files from templates according to the
16090 current configuration.
16091
16092 Usage: $0 [OPTIONS] [FILE]...
16093
16094   -h, --help       print this help, then exit
16095   -V, --version    print version number, then exit
16096   -d, --debug      don't remove temporary files
16097       --recheck    update $as_me by reconfiguring in the same conditions
16098   --file=FILE[:TEMPLATE]
16099                    instantiate the configuration file FILE
16100   --header=FILE[:TEMPLATE]
16101                    instantiate the configuration header FILE
16102
16103 Configuration files:
16104 $config_files
16105
16106 Configuration headers:
16107 $config_headers
16108
16109 Configuration commands:
16110 $config_commands
16111
16112 Report bugs to <dickey@invisible-island.net>."
16113 EOF
16114
16115 cat >>$CONFIG_STATUS <<EOF
16116 ac_cs_version="\\
16117 config.status
16118 configured by $0, generated by GNU Autoconf 2.52.20121002,
16119   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16120
16121 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16122 Free Software Foundation, Inc.
16123 This config.status script is free software; the Free Software Foundation
16124 gives unlimited permission to copy, distribute and modify it."
16125 srcdir=$srcdir
16126 INSTALL="$INSTALL"
16127 EOF
16128
16129 cat >>$CONFIG_STATUS <<\EOF
16130 # If no file are specified by the user, then we need to provide default
16131 # value.  By we need to know if files were specified by the user.
16132 ac_need_defaults=:
16133 while test $# != 0
16134 do
16135   case $1 in
16136   --*=*)
16137     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16138     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16139     shift
16140     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16141     shift
16142     ;;
16143   -*);;
16144   *) # This is not an option, so the user has probably given explicit
16145      # arguments.
16146      ac_need_defaults=false;;
16147   esac
16148
16149   case $1 in
16150   # Handling of the options.
16151 EOF
16152 cat >>$CONFIG_STATUS <<EOF
16153   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16154     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16155     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16156 EOF
16157 cat >>$CONFIG_STATUS <<\EOF
16158   --version | --vers* | -V )
16159     echo "$ac_cs_version"; exit 0 ;;
16160   --he | --h)
16161     # Conflict between --help and --header
16162     { { echo "$as_me:16162: error: ambiguous option: $1
16163 Try \`$0 --help' for more information." >&5
16164 echo "$as_me: error: ambiguous option: $1
16165 Try \`$0 --help' for more information." >&2;}
16166    { (exit 1); exit 1; }; };;
16167   --help | --hel | -h )
16168     echo "$ac_cs_usage"; exit 0 ;;
16169   --debug | --d* | -d )
16170     debug=: ;;
16171   --file | --fil | --fi | --f )
16172     shift
16173     CONFIG_FILES="$CONFIG_FILES $1"
16174     ac_need_defaults=false;;
16175   --header | --heade | --head | --hea )
16176     shift
16177     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16178     ac_need_defaults=false;;
16179
16180   # This is an error.
16181   -*) { { echo "$as_me:16181: error: unrecognized option: $1
16182 Try \`$0 --help' for more information." >&5
16183 echo "$as_me: error: unrecognized option: $1
16184 Try \`$0 --help' for more information." >&2;}
16185    { (exit 1); exit 1; }; } ;;
16186
16187   *) ac_config_targets="$ac_config_targets $1" ;;
16188
16189   esac
16190   shift
16191 done
16192
16193 exec 5>>config.log
16194 cat >&5 << _ACEOF
16195
16196 ## ----------------------- ##
16197 ## Running config.status.  ##
16198 ## ----------------------- ##
16199
16200 This file was extended by $as_me 2.52.20121002, executed with
16201   CONFIG_FILES    = $CONFIG_FILES
16202   CONFIG_HEADERS  = $CONFIG_HEADERS
16203   CONFIG_LINKS    = $CONFIG_LINKS
16204   CONFIG_COMMANDS = $CONFIG_COMMANDS
16205   > $ac_cs_invocation
16206 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16207
16208 _ACEOF
16209 EOF
16210
16211 cat >>$CONFIG_STATUS <<EOF
16212 #
16213 # INIT-COMMANDS section.
16214 #
16215
16216 ABI_VERSION="$ABI_VERSION"
16217 REL_VERSION="$REL_VERSION"
16218 LIB_MODEL="$LIB_MODEL"
16219 LIB_PREFIX="$LIB_PREFIX"
16220 LIB_ROOTNAME="$LIB_ROOTNAME"
16221 DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
16222 RM_SHARED_OPTS="$RM_SHARED_OPTS"
16223 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16224 cf_cv_shlib_version="$cf_cv_shlib_version"
16225
16226 EOF
16227
16228 cat >>$CONFIG_STATUS <<\EOF
16229 for ac_config_target in $ac_config_targets
16230 do
16231   case "$ac_config_target" in
16232   # Handling of arguments.
16233   "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
16234   "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
16235   "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
16236   "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
16237   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16238   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16239   "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
16240   *) { { echo "$as_me:16240: error: invalid argument: $ac_config_target" >&5
16241 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16242    { (exit 1); exit 1; }; };;
16243   esac
16244 done
16245
16246 # If the user did not use the arguments to specify the items to instantiate,
16247 # then the envvar interface is used.  Set only those that are not.
16248 # We use the long form for the default assignment because of an extremely
16249 # bizarre bug on SunOS 4.1.3.
16250 if $ac_need_defaults; then
16251   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16252   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16253   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16254 fi
16255
16256 # Create a temporary directory, and hook for its removal unless debugging.
16257 $debug ||
16258 {
16259   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16260   trap '{ (exit 1); exit 1; }' 1 2 13 15
16261 }
16262
16263 # Create a (secure) tmp directory for tmp files.
16264 : ${TMPDIR=/tmp}
16265 {
16266   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16267   test -n "$tmp" && test -d "$tmp"
16268 }  ||
16269 {
16270   tmp=$TMPDIR/cs$$-$RANDOM
16271   (umask 077 && mkdir $tmp)
16272 } ||
16273 {
16274    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16275    { (exit 1); exit 1; }
16276 }
16277
16278 EOF
16279
16280 cat >>$CONFIG_STATUS <<EOF
16281
16282 #
16283 # CONFIG_FILES section.
16284 #
16285
16286 # No need to generate the scripts if there are no CONFIG_FILES.
16287 # This happens for instance when ./config.status config.h
16288 if test -n "\$CONFIG_FILES"; then
16289   # Protect against being on the right side of a sed subst in config.status.
16290   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16291    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16292 s,@SHELL@,$SHELL,;t t
16293 s,@exec_prefix@,$exec_prefix,;t t
16294 s,@prefix@,$prefix,;t t
16295 s,@program_transform_name@,$program_transform_name,;t t
16296 s,@bindir@,$bindir,;t t
16297 s,@sbindir@,$sbindir,;t t
16298 s,@libexecdir@,$libexecdir,;t t
16299 s,@datarootdir@,$datarootdir,;t t
16300 s,@datadir@,$datadir,;t t
16301 s,@sysconfdir@,$sysconfdir,;t t
16302 s,@sharedstatedir@,$sharedstatedir,;t t
16303 s,@localstatedir@,$localstatedir,;t t
16304 s,@libdir@,$libdir,;t t
16305 s,@includedir@,$includedir,;t t
16306 s,@oldincludedir@,$oldincludedir,;t t
16307 s,@infodir@,$infodir,;t t
16308 s,@mandir@,$mandir,;t t
16309 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16310 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16311 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16312 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16313 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16314 s,@build_alias@,$build_alias,;t t
16315 s,@host_alias@,$host_alias,;t t
16316 s,@target_alias@,$target_alias,;t t
16317 s,@ECHO_C@,$ECHO_C,;t t
16318 s,@ECHO_N@,$ECHO_N,;t t
16319 s,@ECHO_T@,$ECHO_T,;t t
16320 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16321 s,@DEFS@,$DEFS,;t t
16322 s,@LIBS@,$LIBS,;t t
16323 s,@DESTDIR@,$DESTDIR,;t t
16324 s,@CC@,$CC,;t t
16325 s,@CFLAGS@,$CFLAGS,;t t
16326 s,@LDFLAGS@,$LDFLAGS,;t t
16327 s,@CPPFLAGS@,$CPPFLAGS,;t t
16328 s,@ac_ct_CC@,$ac_ct_CC,;t t
16329 s,@EXEEXT@,$EXEEXT,;t t
16330 s,@OBJEXT@,$OBJEXT,;t t
16331 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16332 s,@CPP@,$CPP,;t t
16333 s,@SET_MAKE@,$SET_MAKE,;t t
16334 s,@RANLIB@,$RANLIB,;t t
16335 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16336 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16337 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16338 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16339 s,@LN_S@,$LN_S,;t t
16340 s,@LINT@,$LINT,;t t
16341 s,@LINT_OPTS@,$LINT_OPTS,;t t
16342 s,@AR@,$AR,;t t
16343 s,@ac_ct_AR@,$ac_ct_AR,;t t
16344 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16345 s,@CTAGS@,$CTAGS,;t t
16346 s,@ETAGS@,$ETAGS,;t t
16347 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16348 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16349 s,@ECHO_LT@,$ECHO_LT,;t t
16350 s,@ECHO_LD@,$ECHO_LD,;t t
16351 s,@RULE_CC@,$RULE_CC,;t t
16352 s,@SHOW_CC@,$SHOW_CC,;t t
16353 s,@ECHO_CC@,$ECHO_CC,;t t
16354 s,@build@,$build,;t t
16355 s,@build_cpu@,$build_cpu,;t t
16356 s,@build_vendor@,$build_vendor,;t t
16357 s,@build_os@,$build_os,;t t
16358 s,@host@,$host,;t t
16359 s,@host_cpu@,$host_cpu,;t t
16360 s,@host_vendor@,$host_vendor,;t t
16361 s,@host_os@,$host_os,;t t
16362 s,@PROG_EXT@,$PROG_EXT,;t t
16363 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16364 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16365 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16366 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16367 s,@VERSION@,$VERSION,;t t
16368 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
16369 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
16370 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
16371 s,@PACKAGE@,$PACKAGE,;t t
16372 s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
16373 s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
16374 s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
16375 s,@SUB_INC@,$SUB_INC,;t t
16376 s,@CONFIG_H@,$CONFIG_H,;t t
16377 s,@ALLOCA@,$ALLOCA,;t t
16378 s,@GLIBC21@,$GLIBC21,;t t
16379 s,@LIBICONV@,$LIBICONV,;t t
16380 s,@USE_NLS@,$USE_NLS,;t t
16381 s,@MSGFMT@,$MSGFMT,;t t
16382 s,@GMSGFMT@,$GMSGFMT,;t t
16383 s,@XGETTEXT@,$XGETTEXT,;t t
16384 s,@INTLBISON@,$INTLBISON,;t t
16385 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
16386 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
16387 s,@CATALOGS@,$CATALOGS,;t t
16388 s,@CATOBJEXT@,$CATOBJEXT,;t t
16389 s,@GMOFILES@,$GMOFILES,;t t
16390 s,@INTLLIBS@,$INTLLIBS,;t t
16391 s,@INTLOBJS@,$INTLOBJS,;t t
16392 s,@POFILES@,$POFILES,;t t
16393 s,@POSUB@,$POSUB,;t t
16394 s,@DATADIRNAME@,$DATADIRNAME,;t t
16395 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
16396 s,@GENCAT@,$GENCAT,;t t
16397 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
16398 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
16399 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
16400 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
16401 s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
16402 s,@GT_YES@,$GT_YES,;t t
16403 s,@GT_NO@,$GT_NO,;t t
16404 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
16405 s,@ABI_VERSION@,$ABI_VERSION,;t t
16406 s,@REL_VERSION@,$REL_VERSION,;t t
16407 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
16408 s,@LIBTOOL@,$LIBTOOL,;t t
16409 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
16410 s,@LT_UNDEF@,$LT_UNDEF,;t t
16411 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16412 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16413 s,@LIB_CREATE@,$LIB_CREATE,;t t
16414 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16415 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16416 s,@LIB_PREP@,$LIB_PREP,;t t
16417 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16418 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16419 s,@LIB_LINK@,$LIB_LINK,;t t
16420 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16421 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16422 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16423 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16424 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16425 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16426 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16427 s,@LINK_PROGS@,$LINK_PROGS,;t t
16428 s,@LINK_TESTS@,$LINK_TESTS,;t t
16429 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16430 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16431 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16432 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16433 s,@RPATH_LIST@,$RPATH_LIST,;t t
16434 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16435 s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
16436 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16437 s,@LIB_MODEL@,$LIB_MODEL,;t t
16438 s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
16439 s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
16440 s,@MAKE_SHARED@,$MAKE_SHARED,;t t
16441 s,@MAKE_STATIC@,$MAKE_STATIC,;t t
16442 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16443 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16444 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
16445 s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
16446 s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
16447 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16448 s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
16449 s,@LIB_TARGET@,$LIB_TARGET,;t t
16450 CEOF
16451
16452 EOF
16453
16454   cat >>$CONFIG_STATUS <<\EOF
16455   # Split the substitutions into bite-sized pieces for seds with
16456   # small command number limits, like on Digital OSF/1 and HP-UX.
16457   ac_max_sed_lines=48
16458   ac_sed_frag=1 # Number of current file.
16459   ac_beg=1 # First line for current file.
16460   ac_end=$ac_max_sed_lines # Line after last line for current file.
16461   ac_more_lines=:
16462   ac_sed_cmds=
16463   while $ac_more_lines; do
16464     if test $ac_beg -gt 1; then
16465       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16466     else
16467       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16468     fi
16469     if test ! -s $tmp/subs.frag; then
16470       ac_more_lines=false
16471     else
16472       # The purpose of the label and of the branching condition is to
16473       # speed up the sed processing (if there are no `@' at all, there
16474       # is no need to browse any of the substitutions).
16475       # These are the two extra sed commands mentioned above.
16476       (echo ':t
16477   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16478       if test -z "$ac_sed_cmds"; then
16479         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16480       else
16481         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16482       fi
16483       ac_sed_frag=`expr $ac_sed_frag + 1`
16484       ac_beg=$ac_end
16485       ac_end=`expr $ac_end + $ac_max_sed_lines`
16486     fi
16487   done
16488   if test -z "$ac_sed_cmds"; then
16489     ac_sed_cmds=cat
16490   fi
16491 fi # test -n "$CONFIG_FILES"
16492
16493 EOF
16494 cat >>$CONFIG_STATUS <<\EOF
16495 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16496   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16497   case $ac_file in
16498   - | *:- | *:-:* ) # input from stdin
16499         cat >$tmp/stdin
16500         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16501         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16502   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16503         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16504   * )   ac_file_in=$ac_file.in ;;
16505   esac
16506
16507   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16508   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16509          X"$ac_file" : 'X\(//\)[^/]' \| \
16510          X"$ac_file" : 'X\(//\)$' \| \
16511          X"$ac_file" : 'X\(/\)' \| \
16512          .     : '\(.\)' 2>/dev/null ||
16513 echo X"$ac_file" |
16514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16515           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16516           /^X\(\/\/\)$/{ s//\1/; q; }
16517           /^X\(\/\).*/{ s//\1/; q; }
16518           s/.*/./; q'`
16519   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16520     { case "$ac_dir" in
16521   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16522   *)                      as_incr_dir=.;;
16523 esac
16524 as_dummy="$ac_dir"
16525 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16526   case $as_mkdir_dir in
16527     # Skip DOS drivespec
16528     ?:) as_incr_dir=$as_mkdir_dir ;;
16529     *)
16530       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16531       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16532     ;;
16533   esac
16534 done; }
16535
16536     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16537     # A "../" for each directory in $ac_dir_suffix.
16538     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16539   else
16540     ac_dir_suffix= ac_dots=
16541   fi
16542
16543   case $srcdir in
16544   .)  ac_srcdir=.
16545       if test -z "$ac_dots"; then
16546          ac_top_srcdir=.
16547       else
16548          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16549       fi ;;
16550   [\\/]* | ?:[\\/]* )
16551       ac_srcdir=$srcdir$ac_dir_suffix;
16552       ac_top_srcdir=$srcdir ;;
16553   *) # Relative path.
16554     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16555     ac_top_srcdir=$ac_dots$srcdir ;;
16556   esac
16557
16558   case $INSTALL in
16559   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16560   *) ac_INSTALL=$ac_dots$INSTALL ;;
16561   esac
16562
16563   if test x"$ac_file" != x-; then
16564     { echo "$as_me:16564: creating $ac_file" >&5
16565 echo "$as_me: creating $ac_file" >&6;}
16566     rm -f "$ac_file"
16567   fi
16568   # Let's still pretend it is `configure' which instantiates (i.e., don't
16569   # use $as_me), people would be surprised to read:
16570   #    /* config.h.  Generated automatically by config.status.  */
16571   configure_input="Generated automatically from `echo $ac_file_in |
16572                                                  sed 's,.*/,,'` by configure."
16573
16574   # First look for the input files in the build tree, otherwise in the
16575   # src tree.
16576   ac_file_inputs=`IFS=:
16577     for f in $ac_file_in; do
16578       case $f in
16579       -) echo $tmp/stdin ;;
16580       [\\/$]*)
16581          # Absolute (can't be DOS-style, as IFS=:)
16582          test -f "$f" || { { echo "$as_me:16582: error: cannot find input file: $f" >&5
16583 echo "$as_me: error: cannot find input file: $f" >&2;}
16584    { (exit 1); exit 1; }; }
16585          echo $f;;
16586       *) # Relative
16587          if test -f "$f"; then
16588            # Build tree
16589            echo $f
16590          elif test -f "$srcdir/$f"; then
16591            # Source tree
16592            echo $srcdir/$f
16593          else
16594            # /dev/null tree
16595            { { echo "$as_me:16595: error: cannot find input file: $f" >&5
16596 echo "$as_me: error: cannot find input file: $f" >&2;}
16597    { (exit 1); exit 1; }; }
16598          fi;;
16599       esac
16600     done` || { (exit 1); exit 1; }
16601 EOF
16602 cat >>$CONFIG_STATUS <<\EOF
16603   ac_warn_datarootdir=no
16604   if test x"$ac_file" != x-; then
16605     for ac_item in $ac_file_inputs
16606     do
16607       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
16608       if test -n "$ac_seen"; then
16609         ac_used=`grep '@datarootdir@' $ac_item`
16610         if test -z "$ac_used"; then
16611           { echo "$as_me:16611: WARNING: datarootdir was used implicitly but not set:
16612 $ac_seen" >&5
16613 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
16614 $ac_seen" >&2;}
16615           ac_warn_datarootdir=yes
16616         fi
16617       fi
16618       ac_seen=`grep '${datarootdir}' $ac_item`
16619       if test -n "$ac_seen"; then
16620         { echo "$as_me:16620: WARNING: datarootdir was used explicitly but not set:
16621 $ac_seen" >&5
16622 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
16623 $ac_seen" >&2;}
16624         ac_warn_datarootdir=yes
16625       fi
16626     done
16627   fi
16628
16629 if test "x$ac_warn_datarootdir" = xyes; then
16630   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
16631 fi
16632
16633 EOF
16634 cat >>$CONFIG_STATUS <<EOF
16635   sed "$ac_vpsub
16636 $extrasub
16637 EOF
16638 cat >>$CONFIG_STATUS <<\EOF
16639 :t
16640 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16641 s,@configure_input@,$configure_input,;t t
16642 s,@srcdir@,$ac_srcdir,;t t
16643 s,@top_srcdir@,$ac_top_srcdir,;t t
16644 s,@INSTALL@,$ac_INSTALL,;t t
16645 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16646   rm -f $tmp/stdin
16647   if test x"$ac_file" != x-; then
16648     cp $tmp/out $ac_file
16649
16650     for ac_name in prefix exec_prefix datarootdir
16651     do
16652         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
16653         if test -n "$ac_seen"; then
16654             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
16655             if test -z "$ac_init"; then
16656               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
16657               { echo "$as_me:16657: WARNING: Variable $ac_name is used but was not set:
16658 $ac_seen" >&5
16659 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
16660 $ac_seen" >&2;}
16661             fi
16662         fi
16663     done
16664     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
16665     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
16666     if test -s $tmp/out; then
16667       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
16668       { echo "$as_me:16668: WARNING: Some variables may not be substituted:
16669 $ac_seen" >&5
16670 echo "$as_me: WARNING: Some variables may not be substituted:
16671 $ac_seen" >&2;}
16672     fi
16673   else
16674     cat $tmp/out
16675   fi
16676   rm -f $tmp/out
16677
16678 done
16679 EOF
16680 cat >>$CONFIG_STATUS <<\EOF
16681
16682 #
16683 # CONFIG_HEADER section.
16684 #
16685
16686 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16687 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16688 #
16689 # ac_d sets the value in "#define NAME VALUE" lines.
16690 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16691 ac_dB='[        ].*$,\1#\2'
16692 ac_dC=' '
16693 ac_dD=',;t'
16694 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16695 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16696 ac_iB='\([      ]\),\1#\2define\3'
16697 ac_iC=' '
16698 ac_iD='\4,;t'
16699 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16700 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16701 ac_uB='$,\1#\2define\3'
16702 ac_uC=' '
16703 ac_uD=',;t'
16704
16705 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16706   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16707   case $ac_file in
16708   - | *:- | *:-:* ) # input from stdin
16709         cat >$tmp/stdin
16710         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16711         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16712   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16713         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16714   * )   ac_file_in=$ac_file.in ;;
16715   esac
16716
16717   test x"$ac_file" != x- && { echo "$as_me:16717: creating $ac_file" >&5
16718 echo "$as_me: creating $ac_file" >&6;}
16719
16720   # First look for the input files in the build tree, otherwise in the
16721   # src tree.
16722   ac_file_inputs=`IFS=:
16723     for f in $ac_file_in; do
16724       case $f in
16725       -) echo $tmp/stdin ;;
16726       [\\/$]*)
16727          # Absolute (can't be DOS-style, as IFS=:)
16728          test -f "$f" || { { echo "$as_me:16728: error: cannot find input file: $f" >&5
16729 echo "$as_me: error: cannot find input file: $f" >&2;}
16730    { (exit 1); exit 1; }; }
16731          echo $f;;
16732       *) # Relative
16733          if test -f "$f"; then
16734            # Build tree
16735            echo $f
16736          elif test -f "$srcdir/$f"; then
16737            # Source tree
16738            echo $srcdir/$f
16739          else
16740            # /dev/null tree
16741            { { echo "$as_me:16741: error: cannot find input file: $f" >&5
16742 echo "$as_me: error: cannot find input file: $f" >&2;}
16743    { (exit 1); exit 1; }; }
16744          fi;;
16745       esac
16746     done` || { (exit 1); exit 1; }
16747   # Remove the trailing spaces.
16748   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16749
16750 EOF
16751
16752 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16753 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16754 # be either 'cat' or 'sort'.
16755 sort -u confdefs.h | uniq >conftest.vals
16756
16757 # Break up conftest.vals because some shells have a limit on
16758 # the size of here documents, and old seds have small limits too.
16759
16760 rm -f conftest.tail
16761 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16762 while grep . conftest.vals >/dev/null
16763 do
16764   # Write chunks of a limited-size here document to conftest.frag.
16765   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16766   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16767   echo 'CEOF' >> $CONFIG_STATUS
16768   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16769   rm -f conftest.vals
16770   mv conftest.tail conftest.vals
16771 done
16772 rm -f conftest.vals
16773
16774 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16775 # marker @DEFS@.
16776 echo '  cat >> conftest.edit <<CEOF
16777 /@DEFS@/r conftest.frag
16778 /@DEFS@/d
16779 CEOF
16780 sed -f conftest.edit $tmp/in > $tmp/out
16781 rm -f $tmp/in
16782 mv $tmp/out $tmp/in
16783 rm -f conftest.edit conftest.frag
16784 ' >> $CONFIG_STATUS
16785
16786 cat >>$CONFIG_STATUS <<\EOF
16787   # Let's still pretend it is `configure' which instantiates (i.e., don't
16788   # use $as_me), people would be surprised to read:
16789   #    /* config.h.  Generated automatically by config.status.  */
16790   if test x"$ac_file" = x-; then
16791     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16792   else
16793     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16794   fi
16795   cat $tmp/in >>$tmp/config.h
16796   rm -f $tmp/in
16797   if test x"$ac_file" != x-; then
16798     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16799       { echo "$as_me:16799: $ac_file is unchanged" >&5
16800 echo "$as_me: $ac_file is unchanged" >&6;}
16801     else
16802       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16803          X"$ac_file" : 'X\(//\)[^/]' \| \
16804          X"$ac_file" : 'X\(//\)$' \| \
16805          X"$ac_file" : 'X\(/\)' \| \
16806          .     : '\(.\)' 2>/dev/null ||
16807 echo X"$ac_file" |
16808     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16809           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16810           /^X\(\/\/\)$/{ s//\1/; q; }
16811           /^X\(\/\).*/{ s//\1/; q; }
16812           s/.*/./; q'`
16813       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16814         { case "$ac_dir" in
16815   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16816   *)                      as_incr_dir=.;;
16817 esac
16818 as_dummy="$ac_dir"
16819 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16820   case $as_mkdir_dir in
16821     # Skip DOS drivespec
16822     ?:) as_incr_dir=$as_mkdir_dir ;;
16823     *)
16824       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16825       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16826     ;;
16827   esac
16828 done; }
16829
16830       fi
16831       rm -f $ac_file
16832       mv $tmp/config.h $ac_file
16833     fi
16834   else
16835     cat $tmp/config.h
16836     rm -f $tmp/config.h
16837   fi
16838 done
16839 EOF
16840 cat >>$CONFIG_STATUS <<\EOF
16841 #
16842 # CONFIG_COMMANDS section.
16843 #
16844 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16845   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16846   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16847
16848   case $ac_dest in
16849     default-1 ) for ac_file in $CONFIG_FILES; do
16850
16851       # Support "outfile[:infile[:infile...]]"
16852       case "$ac_file" in
16853         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16854       esac
16855
16856       # PO directories have a Makefile.in generated from Makefile.inn.
16857       case "$ac_file" in */[Mm]akefile.in)
16858         # Adjust a relative srcdir.
16859         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16860         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
16861         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16862         ac_base=`basename $ac_file .in`
16863         # In autoconf-2.13 it is called $ac_given_srcdir.
16864         # In autoconf-2.50 it is called $srcdir.
16865         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16866
16867         case "$ac_given_srcdir" in
16868           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16869           /*) top_srcdir="$ac_given_srcdir" ;;
16870           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
16871         esac
16872
16873         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16874           rm -f "$ac_dir/POTFILES"
16875           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16876           sed -e "/^#/d" -e "/^[        ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
16877           test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
16878           sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
16879         fi
16880         ;;
16881       esac
16882     done ;;
16883     default )
16884
16885 cf_libname=\${LIB_BASENAME}
16886 cf_liblink=$cf_libname
16887 cf_libroot=$cf_libname
16888
16889 if test "x$cf_cv_do_symlinks" = xyes
16890 then
16891         case "x$cf_cv_shlib_version" in #(vi
16892         xrel) #(vi
16893                 cf_liblink="\${LIB_ABI_NAME}"
16894                 cf_libname="\${LIB_REL_NAME}"
16895                 ;;
16896         xabi)
16897                 cf_liblink="\${LIB_REL_NAME}"
16898                 cf_libname="\${LIB_ABI_NAME}"
16899                 ;;
16900         esac
16901 fi
16902 LIB_TARGET=$cf_libname
16903
16904 case x$LIB_MODEL in
16905 xlibtool|xshared) #(vi
16906         cf_libdeps="\${LIBS} \${LDFLAGS}"
16907         ;;
16908 x*)
16909         cf_libdeps=
16910         ;;
16911 esac
16912
16913 cat >>makefile <<CF_EOF
16914
16915 # generated by CF__ADD_SHLIB_RULES
16916 # libmodel: $LIB_MODEL
16917 # symlinks: $cf_cv_do_symlinks
16918 # shlibver: $cf_cv_shlib_version
16919
16920 CF_EOF
16921
16922 cat >>makefile <<CF_EOF
16923 $cf_libname :: \\
16924 CF_EOF
16925
16926 cat >>makefile <<CF_EOF
16927                 \${LIB_OBJECT}
16928         @echo linking \$@
16929         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
16930 CF_EOF
16931
16932 if test "x$cf_cv_do_symlinks" = xyes
16933 then
16934 cat >>makefile <<CF_EOF
16935         \$(LN_S) $cf_libname $cf_liblink
16936         \$(LN_S) $cf_liblink $cf_libroot
16937 CF_EOF
16938 fi
16939
16940 cat >>makefile <<CF_EOF
16941
16942 install \\
16943 install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
16944
16945 \$(DESTDIR)\$(libdir)/$cf_libname :: \\
16946                 \$(DESTDIR)\$(libdir) \\
16947                 \${LIB_OBJECT}
16948         @echo linking \$@
16949         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
16950 CF_EOF
16951
16952 if test "x$cf_cv_do_symlinks" = xyes
16953 then
16954 cat >>makefile <<CF_EOF
16955         cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
16956 CF_EOF
16957 fi
16958
16959 if test x$LIB_MODEL = xshared
16960 then
16961 cat >>makefile <<CF_EOF
16962         - test -z "\$(DESTDIR)" && /sbin/ldconfig
16963 CF_EOF
16964 fi
16965
16966 cat >>makefile <<CF_EOF
16967
16968 uninstall \\
16969 uninstall.libs ::
16970         @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
16971 CF_EOF
16972
16973 if test "x$cf_cv_do_symlinks" = xyes
16974 then
16975 cat >>makefile <<CF_EOF
16976         -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
16977         -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
16978 CF_EOF
16979 fi
16980
16981 cat >>makefile <<CF_EOF
16982         -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
16983
16984 clean \\
16985 clean.libs ::
16986 CF_EOF
16987
16988 if test "x$cf_cv_do_symlinks" = xyes
16989 then
16990 cat >>makefile <<CF_EOF
16991         -rm -f $cf_libroot
16992         -rm -f $cf_liblink
16993 CF_EOF
16994 fi
16995
16996 cat >>makefile <<CF_EOF
16997         -rm -f $cf_libname
16998
16999 mostlyclean::
17000         -rm -f \${LIB_OBJECT}
17001 # end generated by CF__ADD_SHLIB_RULES
17002 CF_EOF
17003
17004  ;;
17005   esac
17006 done
17007 EOF
17008
17009 cat >>$CONFIG_STATUS <<\EOF
17010
17011 { (exit 0); exit 0; }
17012 EOF
17013 chmod +x $CONFIG_STATUS
17014 ac_clean_files=$ac_clean_files_save
17015
17016 # configure is writing to config.log, and then calls config.status.
17017 # config.status does its own redirection, appending to config.log.
17018 # Unfortunately, on DOS this fails, as config.log is still kept open
17019 # by configure, so config.status won't be able to write to it; its
17020 # output is simply discarded.  So we exec the FD to /dev/null,
17021 # effectively closing config.log, so it can be properly (re)opened and
17022 # appended to by config.status.  When coming back to configure, we
17023 # need to make the FD available again.
17024 if test "$no_create" != yes; then
17025   ac_cs_success=:
17026   exec 5>/dev/null
17027   $SHELL $CONFIG_STATUS || ac_cs_success=false
17028   exec 5>>config.log
17029   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17030   # would make configure fail if this is the last instruction.
17031   $ac_cs_success || { (exit 1); exit 1; }
17032 fi
17033